I just wanted to try out playwright and I ran into an issue. When I create a page directly from the browser and navigate between pages it works but when I create a context and then try navigating, only the first URL loads correctly and it happens only with Bing search, google search loads correctly in both conditions I thought there must be some error so I tried in GUI mode also
from playwright.sync_api import sync_playwright
# This works
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
page = browser.new_page()
page.goto("https://bing.com")
input("->")
page.goto("https://bing.com/search?q=Google+search")
input("->")
# But this does not
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
browser_context = browser.new_context()
page = browser_context.new_page()
page.goto("https://bing.com")
input("->")
page.goto("https://bing.com/search?q=Google+search")
input("->")
The Bing search should load normally like google search, but it doesn't.