Issue
How can I click on this element that is inside an iframe with an html document?
Solution
Since Playwright version 1.17, there is a special page.frameLocator
in Playwright for iFrame. This should allow you to access the elements within the iFrame without any problems.
Here is a sample code for the correct syntax:
const btn = page.frame_locator("your-iframe").locator("text=Your Text");
await btn.click();
You need now adapt the example to your HTML structure. Hope it helps you. More details for python usage: https://playwright.dev/python/docs/api/class-framelocator
Answered By - r00k13
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.