Open a new tab manually on a browser open by Playwright
I am using Playwright for Python to open a browser, visit a URL and then do some action.
- Can I keep the browser's window open after my code runs?
- If I put a breakpoint in my Python code, I can not open a new tab in the browser open by Playwright: the page stays blank. What can I do to keep that tab open?
My code:
from playwright.sync_api import sync_playwright
playwright = sync_playwright().start()
browser = playwright.chromium.launch(headless=False)
context = browser.new_context()
auth_page = context.new_page()
auth_page.goto("https://www.toto.fr/")
print('Put breakpoint here')