Common parameter table of add_argument method in selenium. webdriver
- 2021-10-25 07:10:10
- OfStack
We need a lot of configuration parameters when using the selenium library to call Chromedriver. exe. The common parameters are listed below
chrome_options.add_argument("xxx")
Serial number parameter description
1--allow-outdated-plugins does not stop using outdated plug-ins.
2--allow-running-insecure-content By default, the https page does not allow references to javascript/css/plug-ins from the http link. Adding this 1 parameter will release these contents.
3-allow-scripting-gallery allows extension scripts to take effect in the official application center. By default, these scripts are blocked for security reasons.
4--disable-accelerated-video disable GPU accelerated video.
5--disable-dart deactivate Dart.
6--disable-desktop-notifications disables desktop notifications, which are enabled by default in Windows.
7--disable-extensions disables extension.
8--disable-file-system deactivate FileSystem API.
9--disable-preconnect disable TCP/IP pre-connection.
10--disable-remote-fonts Turns off remote font support. Fonts in SVG are not affected by this parameter.
11--disable-speech-input disable voice input.
12--disable-web-security does not comply with the homology policy.
13--disk-cache-dir sets the cache on a given path.
14--disk-cache-size Sets the upper cache size, in bytes.
15--dns-prefetch-disable Disable DNS Preread.
16--enable-print-preview Enables print preview.
17--extensions-update-frequency Sets the extended automatic update frequency, in seconds.
18--incognito lets the browser start directly in stealth mode.
19--keep-alive-for-test Keep browser process after the last tab is closed. (In a sense, it can improve the hot start speed, but you'd better have plenty of memory.)
20--kiosk enables kiosk mode. (1 browsing mode similar to full screen)
21--lang uses the specified language.
22--no-displaying-insecure-content By default, the https page allows references to pictures/fonts/frames from the http link. Adding this 1 parameter blocks this content.
23--no-first-run skips Chromium first run check.
24--no-referrers does not send Http-Referer headers.
25-no-sandbox completely disable sandbox.
26--no-startup-window does not create a window when started.
27--proxy-pac-url uses the pac proxy script for the given URL. (You can also use local files, such as --proxy-pac-url= "file:\\\ c:\ proxy. pac")
28--proxy-server uses the given proxy server, and this parameter is valid only for http and https. (For example--proxy-server=127. 0. 0.1: 8087)
29--single-process runs Chromium in single-process mode. (The browser will give an unsafe warning at startup)
30--start-maximized is maximized at startup.
31--user-agent Use the given User-Agent string
Parameters:--user-data-dir=UserDataDir
Purpose: Customize user account folders (e.g. user-data-dir= "D:\ temp\ Chrome User Data")
Parameters:--process-per-tab
Purpose: Use a separate process for each page
Parameters:--process-per-site
Purpose: Use separate processes for each site
Parameters:--in-process-plugins
Purpose: Plug-ins do not enable separate processes
Parameters:--disable-popup-blocking
Purpose: Disable pop-up blocking
Parameters:--disable-javascript
Purpose: Disable JavaScript
Parameters:--disable-java
Purpose: Disable Java
Parameters:--disable-plugins
Purpose: Disable plug-ins
Parameters: disable-images
Purpose: Disable images
Parameter:--omnibox-popup-count= "num"
Purpose: Change the number of prompt menus popped up in the URL column to num
Parameters:--enable-vertical-tabs
For more information on how to use the selenium library, please see the related links below