Skip to content

Commit

Permalink
新增 LINE Pay
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpingchu committed Jun 29, 2021
1 parent 179b977 commit d070a4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pchome_autobuy.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ def login():
"//li[@class='CC']/a[@class='ui-btn']")
driver.execute_script("arguments[0].click();", button)

### 前往結帳 (LINE Pay) ### (要使用 JS 的方式 execute_script 點擊)
# WebDriverWait(driver, 20).until(
# expected_conditions.element_to_be_clickable(
# (By.XPATH, "//li[@class='LIP']/a[@class='ui-btn line_pay']"))
# )
# button = driver.find_element_by_xpath(
# "//li[@class='LIP']/a[@class='ui-btn line_pay']")
# driver.execute_script("arguments[0].click();", button)

### 點擊提示訊息確定 ###
WebDriverWait(driver, 20).until(
expected_conditions.element_to_be_clickable(
Expand Down

0 comments on commit d070a4a

Please sign in to comment.