Beispiel #1
0
 def input_verifycode(self, verifycode):
     vfcode_element = UiUtil.find_elment('login', 'vcode')
     UiUtil.input(vfcode_element, verifycode)
Beispiel #2
0
 def input_password(self, password):
     upass_element = UiUtil.find_elment('login', 'upass')
     UiUtil.input(upass_element, password)
Beispiel #3
0
 def click_by(self):
     by_button_element = UiUtil.find_elment('order', 'by')
     UiUtil.click(by_button_element)
Beispiel #4
0
    def input_verifycode(self, verifycode):
        vfcode_element = UiUtil.find_elment('login', 'vcode')
        UiUtil.input(vfcode_element, verifycode)

    def click_login_button(self):
        login_button_element = UiUtil.find_elment('login', 'login_button')
        UiUtil.click(login_button_element)

    def do_login(self, login_data):
        self.input_account(login_data['username'])
        self.input_password(login_data['password'])
        self.input_verifycode(login_data['verifycode'])
        self.click_login_button()

    def do_logout(self):
        logout_button_element = UiUtil.find_elment('login', 'logout_button1')
        UiUtil.click(logout_button_element)
        logout_button_element2 = UiUtil.find_elment('login', 'logout_button2')
        UiUtil.click(logout_button_element2)


if __name__ == '__main__':

    driver = UiUtil.get_driver()
    Login(driver).do_login({
        'username': '******',
        'password': '******',
        'verifycode': '0000'
    })
    time.sleep(2)
    Login(driver).do_logout()
Beispiel #5
0
 def click_parking(self):
     self.driver.switch_to.frame('testIframe')
     parking_button_element = UiUtil.find_elment('order','parking')
     UiUtil.click(parking_button_element)