Skip to content

fix: Make Safeway signin text matching case-insensitive #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vertex
Copy link

@vertex vertex commented Feb 20, 2025

fixes #133

Problem

The Safeway website's text content occasionally changes case (e.g., "Sign In" vs "Sign in"), causing our Selenium selectors to fail when trying to find and click elements.

Solution

Updated the XPath selectors to use case-insensitive text matching using the translate() function. This converts both the website's text and our search string to lowercase before comparison.

This approach is more robust than exact case matching as it will match:

  • "Sign In"
  • "Sign in"
  • "SIGN IN"
  • etc.

Testing

  • Tested locally with the current Safeway website
  • Verified that the login flow completes successfully

@a1ch3mist
Copy link

I did the same in #138
but for both sign in fields.

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.

Error: Authentication Failure [TimeoutException] Message
2 participants