def test_empty_name(self): account_page = AccountPage(self.driver) danger_page = DangerPage(self.driver) readExcel = ReadExcel(self.account_test_data_dir) account_test_data = readExcel.get_value_by_row(0,3) account_page.test_add_bank_account(account_test_data) # self.driver.switch_to_alert() text_danger_msg = danger_page.get_text_danger_msg() self.assertEqual(text_danger_msg, account_test_data[6])
def test_same_name(self): account_page = AccountPage(self.driver) alert_page = AlertPage(self.driver) readExcel = ReadExcel(self.account_test_data_dir) account_test_data = readExcel.get_value_by_row(0,2) account_page.test_add_bank_account(account_test_data) # self.driver.switch_to_alert() alert_danger_msg = alert_page.get_alert_msg() self.assertEqual(alert_danger_msg, account_test_data[6])
def setUp(self): self.driver = webdriver.Chrome() self.driver.maximize_window() # baseUrl = 'https://web-gyz-stage.guanplus.com' # self.driver.get(baseUrl) ee = EnterCompany(self.driver) ee.goToCompany() account_page = AccountPage(self.driver) account_page.goToAccountModule(BaseUrl) account_page.openAddAcountPage() time.sleep(3)
def test_addaccount_2(self): account_page = AccountPage(self.driver) readExcel = ReadExcel(self.account_test_data_dir) account_test_data_1 = readExcel.get_value_by_row(1, 1) account_page.test_add_WeChat_account(account_test_data_1)
def test_edit_bank_account(self): account_page = AccountPage(self.driver) # danger_page = DangerPage(self.driver) readExcel = ReadExcel(self.account_test_data_dir) account_test_data = readExcel.get_value_by_row(0,3) account_page.test_add_bank_account(account_test_data)
def test_addaccount_1(self): account_page = AccountPage(self.driver) readExcel = ReadExcel(self.account_test_data_dir) account_test_data = readExcel.get_value_by_row(0, 1) account_page.test_add_bank_account(account_test_data)
def test_addaccount_3(self): account_page = AccountPage(self.driver) readExcel = ReadExcel(self.account_test_data_dir) account_test_data_2 = readExcel.get_value_by_row(2, 1) account_page.test_add_Alipay_account(account_test_data_2)