예제 #1
0
 def setUpClass(self):
     # 登录
     self.fn_web = FanNengWeb(browser)
     self.fn_web.open(test_login_url)
     self.fn_web.type(LoginPage.user_name, user)
     self.fn_web.type(LoginPage.passwd, pass_wd)
     self.fn_web.type(LoginPage.check_text, '1234')
     self.fn_web.click(LoginPage.submit_button)
     sleep(2)
     self.fn_web.open(operation_index)
예제 #2
0
 def setUpClass(self):
     # 登录
     print("···········登录············")
     print("···········browser············", browser)
     print("···········url············", test_login_url)
     print()
     self.fn_web = FanNengWeb(browser)
     self.fn_web.max_window()
     self.fn_web.open(test_login_url)
     self.fn_web.type(LoginPage.user_name, user)
     self.fn_web.type(LoginPage.passwd, pass_wd)
     self.fn_web.click(LoginPage.submit_button)
     sleep(2)
예제 #3
0
class TestBase(unittest.TestCase):
    fn_web = FanNengWeb(browser)

    @classmethod
    def setUpClass(self):
        self.fn_web.open(test_login_url)
        self.fn_web.type(dc_password, passwd)
        self.fn_web.click(dc_login)
        sleep(2)
        # self.fn_web.open(operation_index)

    @classmethod
    def tearDownClass(self):
        # 关闭窗口并退出driver
        self.fn_web.close()
        self.fn_web.quit()
예제 #4
0
class TestBase(unittest.TestCase):
    fn_web = FanNengWeb(browser)

    @classmethod
    def setUpClass(self):
        # 登录
        # self.fn_web = FanNengWeb(browser)
        self.fn_web.open(test_login_url)
        self.fn_web.type(LoginPage.user_name, user)
        self.fn_web.type(LoginPage.passwd, pass_wd)
        self.fn_web.type(LoginPage.check_text, '1234')
        self.fn_web.click(LoginPage.submit_button)
        sleep(2)
        self.fn_web.open(operation_index)

    @classmethod
    def tearDownClass(self):
        # 关闭窗口并退出driver
        self.fn_web.close()
        self.fn_web.quit()
예제 #5
0
class TestBase(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        # 登录
        print("···········登录············")
        print("···········browser············", browser)
        print("···········url············", test_login_url)
        print()
        self.fn_web = FanNengWeb(browser)
        self.fn_web.max_window()
        self.fn_web.open(test_login_url)
        self.fn_web.type(LoginPage.user_name, user)
        self.fn_web.type(LoginPage.passwd, pass_wd)
        self.fn_web.click(LoginPage.submit_button)
        sleep(2)

    @classmethod
    def tearDownClass(self):
        print("···········退出浏览器············")
        # 关闭窗口并退出driver
        self.fn_web.close()
        self.fn_web.quit()