Closed vethman closed 2 years ago
@vethman you should use >>
instead of >
between selectors, like this:
id=vacancy-card-list >> div:has(h3):has-text("Corporate Management Assistent") >> button
Or better yet, use the subtree selection:
page.locator('id=vacancy-card-list').locator('div:has(h3):has-text("Corporate Management Assistent")').locator('button')
You can also use CodeGen to see if it suggests a nice selector; perhaps it will be simpler than what you come up to manually.
Hope this helps! Feel free to file a new issue if you think we can help you!
gives the following error: waiting for selector "id=vacancy-card-list > div:has(h3):has-text("Corporate Management Assistent") >> button"
But when I use this it works. The only difference is '#' vs 'id=':
HTML part: