Fix TRW login by targeting submit button element#42
Merged
Conversation
The "Log In" submit was being located with a loose text match, which collided with the modal heading "Log In To The Real World" — the heading appears first in DOM order, so the click went to a heading element and the form was never submitted. Subsequent TOTP-input lookup then failed because the page was still showing the password form, producing 57+ consecutive poll failures. Switch both Log In and Confirm to button-element selectors so the heading text can't be matched.
When TRW shows the TOTP modal the previous login form remains in the DOM behind it. A generic button[type=submit] fallback selected the hidden Log In button first, so the Confirm click landed on the wrong element and the TOTP form was never submitted.
The chat input element overlays the messages-list area, so Playwright's pre-click actionability check fails with 'subtree intercepts pointer events' and times out. Use force=True to bypass the check; the banner itself is still visible and stable.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Could not find TOTP input field.page.get_by_text("Log In", exact=False).firstmatched the modal heading "Log In To The Real World" (which contains "Log In") in DOM order before the actual submit button. Clicking a heading is a no-op, so the form stayed put.button:has-text(...)) for both Log In and Confirm so heading text can't collide.Test plan
v1.5.2to trigger Docker publish + self-hosted deploydata.scraper - INFO - [TRW] Found N message elementsin container logs (instead of TOTP-input error)/statusshows healthy signal polling