class RegisteredBusinessContacts(BaseTestCase): def setUp(self): BaseTestCase.setUp(self) clear_first_sql() clear_second_sql() self.login_page = LoginPage(self.driver) self.main_page = MainPage(self.driver) self.exit_app = ExitAppPage(self.driver) self.longcard_page = LongCardPage(self.driver) self.registerd_bussiness_first_page_first = RegisteredBusinessContactsOnePage( self.driver) self.registerd_bussiness_second_page = RegisteredBusinessContactsTwoPage( self.driver) self.login_page.login(username=18267990494, password=123456) pass def test_publish_supply_full(self): self.longcard_page.click_expected_card(10001475, '注册业务关系人') self.registerd_bussiness_first_page_first.assert_first_page() self.registerd_bussiness_first_page_first.choose_location() self.registerd_bussiness_first_page_first.type_first_page() self.registerd_bussiness_first_page_first.click_next_button() self.registerd_bussiness_second_page.click_ok_button() self.registerd_bussiness_second_page.assert_sql_empty() pass def tearDown(self): # 注销app self.exit_app.logout_app() sleep(2) BaseTestCase.tearDown(self) pass
def setUp(self): BaseTestCase.setUp(self) self.role = "login" # 初始化账号 self.usr = '******' self.pwd = '12345678' # 初始化page LoginPage(self.driver).login(self.usr, self.pwd) LongCard = LongCardPage(self.driver) LongCard.click_expected_card(10001473, '发布供货供应') pass
def setUp(self): BaseTestCase.setUp(self) self.role = "login" # 初始化账号 self.usr = '******' self.pwd = '12345678' # 初始化page LoginPage(self.driver).login(self.usr, self.pwd) LongCard = LongCardPage(self.driver) LongCard.click_expected_card(10001473, '注册供应商') register_suppliers_sql(user_id=10001473) # 恢复数据 pass
class FunVerifyRisk(BaseTestCase): def setUp(self): BaseTestCase.setUp(self) self.username = '******' self.password = '******' self.login_page = LoginPage(self.driver) self.long_task_page = LongCardPage(self.driver) self.verify_risk_page = VerifyRiskPage(self.driver) pass def test_bill_list(self): """ 风险审核 """ self.login_page.login(self.username, self.password) # 登陆 self.long_task_page.click_expected_card(10001456, '风险审核') # 找到并点击风险审核卡片 self.verify_risk_page.assert_versify_risk(10001456) # assert风险审核详情 pass def tearDown(self): BaseTestCase.tearDown(self) pass