Exemple #1
0
    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])
Exemple #2
0
    def test_partnerset_empty_invalid(self):
        """测试 股东名称为空,保存失败,提示‘请填写名称’"""
        page = PartnersetPage(self.driver)
        dangerPage = DangerPage(self.driver)
        readExcel = ReadExcel(self.partnerset_test_data_dir)

        partnerset_test_data = readExcel.get_value_by_row(0, 1)
        page.add_partnerset(partnerset_test_data)
        page.submit('save')
        time.sleep(1)

        result = dangerPage.get_text_danger_msg()
        self.assertEqual(result, partnerset_test_data[3])
Exemple #3
0
    def test_tax_num_empty(self):
        """纳税人识别号为空,提示‘请填写纳税人识别号’,保存失败"""
        settingPage = SettingPage(self.driver)
        page = CompBillingPage(self.driver)
        dangerPage = DangerPage(self.driver)
        settingPage.go_to_setting_page(CompInfo.BASE_URL)

        read_excel = ReadExcel(self.modify_accounting_book_info_data_dir)
        accounting_book_info_data = read_excel.get_value_by_row(0, 3)
        page.modify_comp_info(accounting_book_info_data)

        text_danger_msg = dangerPage.get_text_danger_msg()
        self.assertEqual(text_danger_msg, accounting_book_info_data[10])
Exemple #4
0
    def test_phone_num_typeError(self):
        """3.往来信息-手机号格式不正确,提示‘手机格式不正确’,保存失败"""
        settingPage = SettingPage(self.driver, CompInfo.BASE_URL)
        page = ContactPage(self.driver)
        dangerPage = DangerPage(self.driver)
        readExcel = ReadExcel(self.add_contact_data_dir)

        settingPage.go_to_contact_page()
        add_contact_data = readExcel.get_value_by_row(0, 2)
        page.add_contact(add_contact_data)
        page.submit('save')

        result = dangerPage.get_text_danger_msg()
        self.assertEqual(result, add_contact_data[7])
        print('result=>', result)
Exemple #5
0
    def test_name_empty(self):
        """2.往来信息-测试往来名称为空,保存失败"""
        settingPage = SettingPage(self.driver, CompInfo.BASE_URL)
        page = ContactPage(self.driver)
        readExcel = ReadExcel(self.add_contact_data_dir)
        dangerPage = DangerPage(self.driver)

        settingPage.go_to_contact_page()
        add_contact_data = readExcel.get_value_by_row(0, 1)
        page.add_contact(add_contact_data)
        page.submit('save')

        result = dangerPage.get_text_danger_msg()
        self.assertEqual(result, add_contact_data[7])
        print('result=>', result)