Skip to content

Commit

Permalink
Add more detailed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ARC-MX committed Jun 6, 2024
1 parent a76e7be commit ac7270d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/data_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,21 @@ def _get_webdriver(self):
def _login(self, driver):

driver.get(LOGIN_URL)
logging.info("Open LOGIN_URL:{LOGIN_URL}.\r")
time.sleep(self.RETRY_WAIT_TIME_OFFSET_UNIT)
# swtich to username-password login page
driver.find_element(By.CLASS_NAME, "user").click()
logging.info("find_element user.\r")
time.sleep(self.RETRY_WAIT_TIME_OFFSET_UNIT)
# input username and password
input_elements = driver.find_elements(By.CLASS_NAME, "el-input__inner")
input_elements[0].send_keys(self._username)
logging.info("input_elements username :{self._username}.\r")
input_elements[1].send_keys(self._password)
logging.info("input_elements password :{self._password}.\r")
# click agree button
self._click_button(driver, By.XPATH, '//*[@id="login_box"]/div[2]/div[1]/form/div[1]/div[3]/div/span[2]')
logging.info("Click the Agree option.\r")
time.sleep(self.RETRY_WAIT_TIME_OFFSET_UNIT)
# click login button
self._click_button(driver, By.CLASS_NAME, "el-button.el-button--primary")
Expand Down

0 comments on commit ac7270d

Please sign in to comment.