Skip to content

Wait for spinner to be hidden before clicking#1

Merged
jdholtz merged 1 commit intojdholtz:masterfrom
mightyquack:master
Apr 17, 2022
Merged

Wait for spinner to be hidden before clicking#1
jdholtz merged 1 commit intojdholtz:masterfrom
mightyquack:master

Conversation

@mightyquack
Copy link
Copy Markdown
Contributor

It was crashing trying to click on the login box before the spinner disappeared. This will now wait for the Spinner to be invisible and the Login button to be clickable.

Fixes this error:
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (1849, 28). Other element would receive the click:

...

@jdholtz
Copy link
Copy Markdown
Owner

jdholtz commented Apr 17, 2022

Thanks! I wonder if this should be done to the check-in function that uses the same method...

Since you used EC.element_to_be_clickable, from my understanding, you wouldn't need to wait for the spinner to disappear because the driver wouldn't try to click the element until it is able to.

Also, it might be better to use EC.element_to_be_clickable everywhere instead of EC.presence_of_element_located to mitigate any more errors like this one.

I am not very experienced with selenium though, so I could be totally wrong.

@mightyquack
Copy link
Copy Markdown
Contributor Author

mightyquack commented Apr 17, 2022 via email

@jdholtz jdholtz merged commit 4b1d7e1 into jdholtz:master Apr 17, 2022
jdholtz added a commit that referenced this pull request Apr 30, 2022
The latest version of undetected_chromedriver fixes running multiple
browsers at the same time.

Also, the latest version of undetected_chromedriver adds the
--no-sandbox flag by default, so that is not needed. The
--disable-dev-shm-usage flag might need to be added when I add a Docker
implementation, but for right now it is useless.
@jdholtz
Copy link
Copy Markdown
Owner

jdholtz commented Apr 30, 2022

Accidentally referenced this in a commit message. It was meant for #2. Fixed now

@schmeed schmeed mentioned this pull request Oct 14, 2022
jdholtz added a commit that referenced this pull request Mar 15, 2023
This was fixed before in #1, but I accidentally removed it in commit
98c11c0.
jtc268 pushed a commit to jtc268/auto-southwest-check-in that referenced this pull request Aug 21, 2025
Wait for spinner to be hidden before clicking

--Note: Might need to be added to the check-in function as well. Also look into using 'element_to_be_clickable' instead of 'presence_of_element_located' for every element.
jtc268 pushed a commit to jtc268/auto-southwest-check-in that referenced this pull request Aug 21, 2025
This was fixed before in jdholtz#1, but I accidentally removed it in commit
98c11c0.
ctkubik pushed a commit to ctkubik/auto-southwest-check-in that referenced this pull request Mar 29, 2026
Flight C3GDAI's check-in FAILED because the seat upgrade function
held browser_session._lock for 10+ minutes while navigating
www.southwest.com. When the check-in thread (24h before departure)
tried to acquire the lock, it was blocked. When it finally got the
lock, the browser was on www.southwest.com (not mobile.southwest.com),
causing fetch() to fail with status 0 (same-origin policy violation).

Three fixes:

1. CRITICAL: Check-in proximity guard (worker.py)
   - attempt_seat_upgrades() now checks if ANY check-in is within
     2 hours. If so, seat upgrades are PAUSED entirely.
   - Check-in is always the jdholtz#1 priority. Seat upgrades can wait.
   - Activity log shows: "Seat upgrades PAUSED: check-in for X in Y minutes"

2. HIGH: Fresh browser session before check-in (checkin_handler.py)
   - 30 minutes before check-in, the handler now calls
     browser_session.start() (not just ensure_alive())
   - This creates a completely fresh browser on mobile.southwest.com
   - Guarantees the browser is on the correct domain with fresh WAF
     tokens, regardless of what seat upgrades did earlier

3. MEDIUM: Lock timeout in make_request (browser_session.py)
   - Changed from blocking `with self._lock:` to timed acquisition
     `self._lock.acquire(timeout=60)`
   - If the lock can't be acquired within 60 seconds, logs a warning
     and retries instead of blocking indefinitely
   - Prevents check-in from being stuck waiting for seat upgrade forever

https://claude.ai/code/session_01XeexS9xn1dz8wb9K11MkpV
e280l132 pushed a commit to e280l132/auto-southwest-check-in that referenced this pull request Apr 8, 2026
This was fixed before in jdholtz#1, but I accidentally removed it in commit
0fc5d60.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants