Rayrun
← Back to Discord Forum

Relative selector not working when using inside another locator

Hi there, I have a problem, that when chaining locators, I need to select direct children in the chained locator, but it is not working: This absolute locator works: SOME_PARENT_SELECTOR >> //div This relative locator doesn't: SOME_PARENT_SELECTOR >> ./div

And when I use the first one, it looks everywhere in the whole subtree, but I want to have those divs to be children of element found by SOME_PARENT_SELECTOR

Can anybody help me please? Thanks a lot, I will greatly appreciate 🙂

This thread is trying to answer question "How can I select direct children in a chained locator using a relative selector?"

0 replies
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].