Пример #1
0
class TestWater(unittest.TestCase):
    URL = Config().get('URL')

    def setUp(self):
        self.driver = WaterMainPage(browser_type='chrome').get(
            self.URL, maximize_window=True)

    def tearDown(self):
        self.driver.quit()

    def test_increat_organization(self):
        self.driver.slide_verification_login()
        self.driver.increat_organization()
        # 断言判断是否新增成功
        # self.driver.test_1()
        element = self.driver.find_element(
            By.XPATH,
            "//div[1]/div/section/section/section/main/div[3]/div/div[3]/div[1]/div[3]/table/tbody/tr[1]/td[2]/div"
        ).text
        print(element)
        try:
            self.assertEqual(element, '北京')
            print('新增机构成功!')
        except Exception as e:
            print('Assertion test fail.', format(e))
Пример #2
0
class TestWater(unittest.TestCase):
    URL = Config().get('URL')
    department_service_audit_codes_elements_texts = []

    def setUp(self):
        self.driver = WaterMainPage(browser_type='chrome').get(
            self.URL, maximize_window=True)

    def test_general_audit(self):
        self.driver.slide_verification_general_login()
        department_code_card, self.department_service_audit_codes_elements_texts = self.driver.department_to_audit(
        )  # 市场部同意
        try:
            self.assertIn(department_code_card,
                          self.department_service_audit_codes_elements_texts,
                          "服务卡号为%s 的补贴申请同意!" % department_code_card)
        except Exception as e:
            print(format(e))

    def tearDown(self):
        self.driver.quit()
Пример #3
0
class TestWater(unittest.TestCase):
    URL = Config().get('URL')

    def setUp(self):
        self.driver = WaterMainPage(browser_type='chrome').get(
            self.URL, maximize_window=True)

    def tearDown(self):
        self.driver.quit()

    def del_org(self):
        element = self.driver.find_element(
            By.XPATH,
            "//div[1]/div/section/section/section/main/div[3]/div/div[3]/div[1]/div[3]/table/tbody/tr[1]/td[2]/div"
        ).text

        self.driver.del_organization()
        try:
            self.assertIsNone(element)
            print('删除成功!')
        except Exception as e:
            print('Assertion test fail.', format(e))
Пример #4
0
class TestWater(unittest.TestCase):
    URL = Config().get('URL')

    def setUp(self):
        self.driver = WaterMainPage(browser_type='chrome').get(
            self.URL, maximize_window=True)

    def tearDown(self):
        self.driver.quit()

    def test_work_order(self):
        self.driver.slide_verification_login()
        self.driver.work_order_designate()
Пример #5
0
 def setUp(self):
     self.driver = WaterMainPage(browser_type='chrome').get(
         self.URL, maximize_window=True)
Пример #6
0
 def setUpClass(cls):
     cls.driver = WaterMainPage(browser_type='chrome').get(
         cls.URL, maximize_window=True)