Skip to content

fix: complicated locator - #4170

Merged
kobenguyent merged 1 commit into
3.xfrom
fix-4167
Feb 3, 2024
Merged

fix: complicated locator#4170
kobenguyent merged 1 commit into
3.xfrom
fix-4167

Conversation

@kobenguyent

@kobenguyent kobenguyent commented Feb 2, 2024

Copy link
Copy Markdown
Collaborator

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

mirao commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

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
@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