Search code examples
pythonbrowserplaywrightplaywright-python

Can Playwright be used to launch a browser instance


I'm finding that in some cases web pages are being rendered in one browser materially different than another browser. Specifically, Playwright running webkit is rendering a different structure than what I see when viewing the page in a standalone Chrome browser. No clue why and I can't do anything about it. This isn't a Playwright issue, it is rendering it the same way as a standalone browser would. Problem is I don't know of an up-to-date webkit based browser for Windows.

Is there a way using just Playwright to open a browser window that will let me manually enter a url and inspect the page as Playwright renders it?


Solution

  • You can use Playwright's codegen tool and open the webkit browser

    playwright codegen -b webkit