Closed brism17 closed 3 years ago
It is unclear if this is a bug in Playwright or a bug in the test. I can see that you are setting html with links via page.setContent
. That only works if all the link in that html are absolute, otherwise browser does not know how to resolve them. Given that you have a server in place, you probably want to serve this file instead.
We need more details in order to be able to address this issue, namely answer to the above. I'll close this bug as non-actionable, but if this still happens to you, could you please file a new issue with the log dump and link this one?
Context:
Code Snippet await this.page.setContent(notebookPageContent); private notebookPageContent(pageContentParams: INotebookPageContentParams) { const { loadOptions, mode, notebookContent, snippets, iframeSandboxHostUrl } = pageContentParams; const optionsJson = stringifyOptions(loadOptions); const notebookContentJson = notebookContent ? JSON.stringify(notebookContent) : "undefined"; const snippetsJson = snippets ? JSON.stringify(snippets) : "undefined"; const headerScript = pageContentParams.headerScript || ""; const iframeSandboxHostUrlValue = iframeSandboxHostUrl ?
"${iframeSandboxHostUrl}"
: undefined;}
Describe the bug
The set content call is timingout even after the timeout is increased to 60 seconds. No issues when I try to load the same html in firefox or chromium browser. Sometimes some of our tests succeed when playwright is run in headful mode but never in headless mode. I notice that our component doesn't fully load in headful mode (the icons are missing) but the tests will still succeed some of the time. Is there something special we need to do to our html to load in webkit browser ? I have attached the full files for one of our tests that appears to be failing as well as our implementation of a class called NotebookPage which is what we are setting our page content too. Playwright bug files.zip
Add any other details about the problem here.