Пример #1
0
 def test_delete_project(self, login_domain):
     dr = login_domain
     p_data = datainfo.get_xls_to_dict("projectdata.xlsx", "Sheet1")["创建项目"]
     ppg = auth_project_page.AuthProjectPage(dr)
     pac = projectaction.PojectAction(dr)
     pac.delete_project(p_data["projectname"])
     ppg.open_authproject()
     ppg.input_and_search_project(p_data["projectname"])
     sleep(1)
     dr.wait(5)
     add_image(dr, "删除项目")
     flag = dr.element_exist("xpath->//td")
     assert flag is False
Пример #2
0
 def test_create_project(self, login_admin):
     dr = login_admin
     p_data = datainfo.get_xls_to_dict("projectdata.xlsx", "Sheet1")["创建项目"]
     ppg = auth_project_page.AuthProjectPage(dr)
     pac = projectaction.PojectAction(dr)
     pac.create_project(p_data["tenantname"], p_data["projectname"],
                        p_data["projectdesc"])
     ppg.open_authproject()
     ppg.input_and_search_project(p_data["projectname"])
     dr.wait(5)
     add_image(dr, "创建项目")
     text = dr.get_text(
         "xpath->//div[@class='box-body']/table-component/div/table/tbody")
     # 搜索项目
     assert p_data["projectname"] in text, "%s不在预期结果%s中" % (
         p_data["projectname"], text)
     assert p_data["tenantname"] in text, "%s不在预期结果%s中" % (
         p_data["tenantname"], text)
Пример #3
0
 def __init__(self, driver):
     self.dr = driver
     self.propg = auth_project_page.AuthProjectPage(self.dr)
     self.log = log.Log()
Пример #4
0
 def __init__(self, driver):
     self.dr = driver
     self.netpage = networkpage.NetwoekPage(self.dr)
     self.projectpage = auth_project_page.AuthProjectPage(self.dr)
     self.log = log.Log()