Skip to content

Commit

Permalink
Get rid of pop-ups on page loading when logging in
Browse files Browse the repository at this point in the history
Fixes #226. For a reason unknown to me, Southwest's website now has a
pop-up saying "Something must have gone wrong. Please try again" when
running the Docker image (it is probably due to their website changes
that are happening now). Clicking "OK" on the pop-up removes it and
everything else works correctly, so that is the solution for now.
  • Loading branch information
jdholtz committed Feb 16, 2024
1 parent 9ede539 commit 33cd467
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ version is necessary for the script to adapt to these changes (and expect more p
([#223](https://github.com/jdholtz/auto-southwest-check-in/issues/223))
- Fix an index error during fare checking that resulted in either a crash or monitoring of the wrong flight
([#224](https://github.com/jdholtz/auto-southwest-check-in/issues/224))
- Fix pop-ups on the Southwest website from interfering with logging in
([#226](https://github.com/jdholtz/auto-southwest-check-in/issues/226))

### Upgrading
- Upgrade the dependencies to the latest versions by running `pip install -r requirements.txt`
Expand Down
5 changes: 5 additions & 0 deletions lib/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def get_reservations(self, account_monitor: AccountMonitor) -> List[JSON]:

# Log in to retrieve the account's reservations and needed headers for later requests
seleniumbase_actions.wait_for_element_not_visible(driver, ".dimmer")

# If a popup came up with an error, click "OK" to remove it.
# See https://github.com/jdholtz/auto-southwest-check-in/issues/226
driver.click_if_visible(".button-popup.confirm-button")

driver.click(".login-button--box")
driver.type('input[name="userNameOrAccountNumber"]', account_monitor.username)

Expand Down

0 comments on commit 33cd467

Please sign in to comment.