about iframe
ctinkong opened this issue · 2 comments
ctinkong commented
The issue is as follows:
while testing a webpage, I need to access the controls within a child iframe. This iframe is dynamically generated by the parent page after the page has successfully loaded through a window.load event. During the code execution, I receive the page.OnLoad event, but the iframe does not appear. Additionally, I have logged the requests from page.OnRequest and indeed, I cannot find any URL associated with the iframe.
I would like to display the browser UI. I have only found examples for Node.js in the documentation. Could you please advise on how to display the UI, or does anyone have any insights into this issue? Thank you.
canstand commented
- Use
Headless: false
to show browser.
browser, err := playwright.Chromium.Launch(playwright.BrowserTypeLaunchOptions{
Headless: playwright.Bool(false),
})
- to deal with iframe, you should use
page.FrameLocator
. otherwise check requests withbrowserContext.OnRequest
ctinkong commented
Headless: playwright.Bool(false),
It works. thanks.