Beispiel #1
0
 def input_data(self, page, mapKey, dataKey):
     self.inputBox = self.get_object(page, mapKey)
     self.data = rd.read_data(dataKey)
     self.inputBox.send_keys(self.data)
Beispiel #2
0
 def open_browser(self):
     self.browser = webdriver.Chrome("D:\Tools\chromedriver_win32\chromedriver")
     self.browser.implicitly_wait(30)
     self.browser.get(rd.read_data("url"))
     self.browser.maximize_window()
Beispiel #3
0
 def login(self):
     self.get_object("登录页面","用户名").send_keys(rd.read_data("用户名"))
     self.get_object("登录页面","密码").send_keys(rd.read_data("密码"))
     self.get_object("登录页面","验证码").send_keys(rd.read_data("验证码"))
     self.get_object("登录页面","登录").click()
     assert rd.read_data("title") == self.browser.title