如何使用 playwright-python 自定义 msedge 的命令行选项?

How to customize msedge's command line options with playwright-python?

提问人:link89 提问时间:9/14/2023 更新时间:9/14/2023 访问量:38

问:

当我手动启动msedge时,在我能找到命令行选项是edge://version

--no-startup-window /prefetch:5 --flag-switches-begin --flag-switches-end

如果我用 启动相同的浏览器,则选项变为playwright

--disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --no-sandbox --remote-debugging-pipe --flag-switches-begin --flag-switches-end about:blank

有什么方法可以摆脱这些预设选项吗?我已经尝试了这些选项,它只是将新选项附加到列表中。args

剧作家 web自动化 剧本-python

评论


答: 暂无答案