예제 #1
0
    def test_Login_T(cls, uname, upass, ucode, expect):

        Service.login_account(cls, add_user_info)
        Service.click_text(cls.driver, '行政综合')
        Service.decryption(cls.driver)
        if cls.driver.find_element_by_link_text('注销'):
            actual = 'loogin_correct'
            # cls.driver.find_element_by_link_text('注销').click()
        else:
            actual = 'loogin_failed'
            cls.driver.refresh()
        cls.assertEqual(actual, expect)
        sleep(5)
        Service.restart(cls)
예제 #2
0
    def test_Login(cls, uname, upass, ucode, expect):

        # driver =Service.get_driver(add_user_info)
        login_data = {
            'username': add_user_info['username'],
            'password': add_user_info['password'],
            'code': '0000'
        }
        Login(cls.driver).do_login(add_user_info, login_data)
        Service.click_text(cls.driver, '行政综合')
        Service.decryption(cls.driver)
        if cls.driver.find_element_by_link_text('注销'):
            actual = 'loogin_correct'
            # cls.driver.find_element_by_link_text('注销').click()
        else:
            actual = 'loogin_failed'
            cls.driver.refresh()
        cls.assertEqual(actual, expect)
        sleep(5)
        Service.restart(cls)