亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

selenium.webdriver中add_argument方法常用參數(shù)表

 更新時(shí)間:2021年04月08日 16:08:16   投稿:WDC  
這篇文章主要介紹了selenium.webdriver中add_argument方法常用參數(shù)表,需要的朋友可以參考下

我們?cè)谑褂胹elenium庫(kù)調(diào)用Chromedriver.exe時(shí)需要很多的配置參數(shù)下面列出了常用參數(shù)

chrome_options.add_argument("xxx")

序號(hào)  參數(shù)  說(shuō)明

1   --allow-outdated-plugins     不停用過(guò)期的插件。

2   --allow-running-insecure-content     默認(rèn)情況下,https 頁(yè)面不允許從 http 鏈接引用 javascript/css/plug-ins。添加這一參數(shù)會(huì)放行這些內(nèi)容。

3   --allow-scripting-gallery    允許拓展腳本在官方應(yīng)用中心生效。默認(rèn)情況下,出于安全因素考慮這些腳本都會(huì)被阻止。

4   --disable-accelerated-video  停用 GPU 加速視頻。

5   --disable-dart   停用 Dart。

6   --disable-desktop-notifications  禁用桌面通知,在 Windows 中桌面通知默認(rèn)是啟用的。

7   --disable-extensions     禁用拓展。

8   --disable-file-system    停用 FileSystem API。

9   --disable-preconnect     停用 TCP/IP 預(yù)連接。

10  --disable-remote-fonts   關(guān)閉遠(yuǎn)程字體支持。SVG 中字體不受此參數(shù)影響。

11  --disable-speech-input   停用語(yǔ)音輸入。

12  --disable-web-security   不遵守同源策略。

13  --disk-cache-dir     將緩存設(shè)置在給定的路徑。

14  --disk-cache-size    設(shè)置緩存大小上限,以字節(jié)為單位。

15  --dns-prefetch-disable   停用DNS預(yù)讀。

16  --enable-print-preview   啟用打印預(yù)覽。

17  --extensions-update-frequency    設(shè)定拓展自動(dòng)更新頻率,以秒為單位。

18  --incognito  讓瀏覽器直接以隱身模式啟動(dòng)。

19  --keep-alive-for-test    最后一個(gè)標(biāo)簽關(guān)閉后仍保持瀏覽器進(jìn)程。(某種意義上可以提高熱啟動(dòng)速度,不過(guò)你最好得有充足的內(nèi)存)

20  --kiosk  啟用kiosk模式。(一種類(lèi)似于全屏的瀏覽模式)

21  --lang   使用指定的語(yǔ)言。

22  --no-displaying-insecure-content     默認(rèn)情況下,https 頁(yè)面允許從 http 鏈接引用圖片/字體/框架。添加這一參數(shù)會(huì)阻止這些內(nèi)容。

23  --no-first-run   跳過(guò) Chromium 首次運(yùn)行檢查。

24  --no-referrers   不發(fā)送 Http-Referer 頭。

25  --no-sandbox     徹底停用沙箱。

26  --no-startup-window  啟動(dòng)時(shí)不建立窗口。

27  --proxy-pac-url  使用給定 URL 的 pac 代理腳本。(也可以使用本地文件,如 --proxy-pac-url="file:\\\c:\proxy.pac")

28  --proxy-server   使用給定的代理服務(wù)器,這個(gè)參數(shù)只對(duì) http 和 https 有效。(例如 --proxy-server=127.0.0.1:8087 )

29  --single-process     以單進(jìn)程模式運(yùn)行 Chromium。(啟動(dòng)時(shí)瀏覽器會(huì)給出不安全警告)

30  --start-maximized    啟動(dòng)時(shí)最大化。

31  --user-agent     使用給定的 User-Agent 字符串

參數(shù):--user-data-dir=UserDataDir

用途:自訂使用者帳戶(hù)資料夾(如:–user-data-dir="D:\temp\Chrome User Data")

參數(shù):--process-per-tab

用途:每個(gè)分頁(yè)使用單獨(dú)進(jìn)程

參數(shù):--process-per-site

用途:每個(gè)站點(diǎn)使用單獨(dú)進(jìn)程

參數(shù):--in-process-plugins

用途:插件不啟用單獨(dú)進(jìn)程

參數(shù):--disable-popup-blocking

用途:禁用彈出攔截

參數(shù):--disable-javascript

用途:禁用JavaScript

參數(shù):--disable-java

用途:禁用Java

參數(shù):--disable-plugins

用途:禁用插件

參數(shù):–disable-images

用途:禁用圖像

參數(shù):--omnibox-popup-count=”num”

用途:將網(wǎng)址列彈出的提示選單數(shù)量改為num個(gè)

參數(shù):--enable-vertical-tabs

更多關(guān)于selenium庫(kù)的使用方法請(qǐng)查看下面的相關(guān)鏈接

相關(guān)文章

最新評(píng)論