def login(self):
self.driver = webdriver.Chrome(self.driverPath)
self.wait = WebDriverWait(self.driver, self.waitSeconds)
self.driver.get(self.loginUrl)
phone = self.wait.until(EC.element_to_be_clickable((By.XPATH, "//*[@id='login_field']")))
passwd = self.wait.until(EC.element_to_be_clickable((By.XPATH, "//*[@id='password']")))
loginbtn = self.wait.until(EC.element_to_be_clickable((By.XPATH, "//*[@id='login']/form/div[4]/input[3]")))
phone.send_keys(Settings.USER_NAME)
passwd.send_keys(Settings.PASSWD)
loginbtn.send_keys(Keys.RETURN)
评论列表
文章目录