目前我使用下面的代码打开一个新的浏览器会话,但它总是以隐身方式开始,我可以开始一个新的 chromium 会话而不是隐身方式吗?:
from behave import *
from playwright.sync_api import sync_playwright
import time
class session_driver:
driver = None
def open_browser(self, url):
playW_sync_instace = sync_playwright().start()
global browser
browser = playW_sync_instace.chromium.launch(headless=False)
browser.new_context(record_video_dir="videos/",
record_video_size={"width": 640, "height": 480})
self.driver = browser.new_page()
self.driver.goto(url)