According https://playwright.dev/docs/api/class-elementhandle#elementhandleselector, i should be able to subquery for a given element .
It appears to query the whole page instead of the given element.
Ex:
https://the-internet.herokuapp.com/add_remove_elements/
- Click button (//div[@Class="example"]/button)
- Retrieve elementHandle(//div[@Class="elements"])
- Subquery this one using elementHandle.$('//button')
- Click this element
=> Add element button is clicked instead of Delete
According https://playwright.dev/docs/api/class-elementhandle#elementhandleselector, i should be able to subquery for a given element .
It appears to query the whole page instead of the given element.
Ex:
https://the-internet.herokuapp.com/add_remove_elements/
=>
Add elementbutton is clicked instead ofDelete