-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
Closed
Copy link
Description
What are you trying to achieve?
locate(".ps-menu-button").withText("Authoring").inside(".ps-submenu-root:nth-child(3)")
is translated to XPath that matches an element on page
- 3.5.8:
//*[contains(concat(' ', normalize-space(./@class), ' '), ' ps-menu-button ')][contains(., 'Authoring')][ancestor::*[(contains(concat(' ', normalize-space(./@class), ' '), ' ps-submenu-root ') and count(preceding-sibling::*) = 2)]]
works ✔️
What do you get instead?
- 3.5.10/3.5.11:
//*[contains(@class, "ps-menu-button")][contains(., 'Authoring')][ancestor::*[3][contains(@class, "ps-submenu-root")]]
doesn't work (neither in test nor in web browser inspector) 🐞 - 3.5.12:
//*[@class and contains(concat(' ', normalize-space(@class), ' '), ' ps-menu-button ')][contains(., 'Authoring')][ancestor::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' ps-submenu-root ') and (position() = 3)]]
doesn't work (neither in test nor in web browser inspector) 🐞- The fix fix: cannot locate complicated locator #4101 didn't help
Details
- CodeceptJS version: 3.5.12
- NodeJS Version: v18.15.0
- Operating System: Ubuntu 22.04
Metadata
Metadata
Assignees
Labels
No labels