Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: complicated locator #4170

Merged
merged 1 commit into from
Feb 3, 2024
Merged

fix: complicated locator #4170

merged 1 commit into from
Feb 3, 2024

Conversation

kobenguyent
Copy link
Collaborator

@kobenguyent kobenguyent commented Feb 2, 2024

Motivation/Description of the PR

It seems that adding of ':nth-child' into the array

const limitation = [':nth-of-type', ':first-of-type', ':last-of-type', ':nth-last-child', ':nth-last-of-type', ':checked', ':disabled', ':enabled', ':required', ':lang']; fixes the issue. Then an old conversion way over css-to-xpath is used.

Type of change

  • 馃悰 Bug fix

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@kobenguyent kobenguyent added the bug label Feb 2, 2024
@mirao
Copy link
Contributor

mirao commented Feb 2, 2024

I patched locator.js the same way in 3.5.12 (in our testing branch) and all tests passed. Now we can finally upgrade from 3.5.8 to 3.5.12.
Thank you!

@kobenguyent kobenguyent merged commit 91c1840 into 3.x Feb 3, 2024
14 checks passed
@kobenguyent kobenguyent deleted the fix-4167 branch February 3, 2024 04:37
@kobenguyent kobenguyent mentioned this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Locator builder produces incorrect value for "locate().withText().inside()"
2 participants