Skip to content

Commit

Permalink
Fix Authentication Failure ElementNotInteractable Error
Browse files Browse the repository at this point in the history
As per #100
  • Loading branch information
qtang authored Oct 16, 2023
1 parent 2afa5e2 commit 33db9e8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions safeway_coupons/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _login(self, account: Account) -> None:
driver.implicitly_wait(10)
wait = WebDriverWait(driver, 10)
# Navigate to the website URL
url = "https://www.safeway.com"
url = "https://www.safeway.com/account/sign-in.html?goto=/foru/coupons-deals.html"
print("Connect to safeway.com")
driver.get(url)
try:
Expand All @@ -105,18 +105,6 @@ def _login(self, account: Account) -> None:
button.click()
except NoSuchElementException:
print("Skipping cookie prompt which is not present")
print("Open Sign In sidebar")
wait.until(
ec.visibility_of_element_located(
(By.XPATH, "//span [contains(text(), 'Sign In')]")
)
).click()
print("Open Sign In form")
wait.until(
ec.visibility_of_element_located(
(By.XPATH, "//a [contains(text(), 'Sign In')]")
)
).click()
time.sleep(2)
print("Populate Sign In form")
driver.find_element(By.ID, "label-email").send_keys(
Expand Down

0 comments on commit 33db9e8

Please sign in to comment.