Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a list of all available ChromeOption arguments?

I am a big advocate for reading the manual. But in this case, despite searching online for some time I cannot find a manual explaining all of the available ChromeOptions arguments. Somewhere there must be a listing of all of the string arguments and what they mean.

For example, here are some that I found by stumbling through examples:

var options = new ChromeOptions(); options.AddArgument("incognito"); options.AddArguments("test-type"); 

Can someone please direct me to a listing? I am using C# 4.6, Selenium 2.45.

like image 358
sapbucket Avatar asked Jul 12 '16 17:07

sapbucket


People also ask

How do I get to ChromeDriver from Chrome options?

Using the ChromeOptions class You can create an instance of ChromeOptions, which has convenient methods for setting ChromeDriver-specific capabilities. You can then pass the ChromeOptions object into the ChromeDriver constructor: ChromeOptions options = new ChromeOptions(); options.

How do I set desired capabilities for Chrome in selenium?

To declare Desired Capabilities in Selenium automation testing using Grid, we can use the setCapability method from the DesiredCapabilities class to set the different types of capabilities of the browser (Ex. Chrome, IE, Firefox, Edge) platform name (Ex. Windows, macOS, etc.).

Which capability is used for using an external ChromeDriver?

The WebDriver language APIs provides ways to pass capabilities to ChromeDriver. The exact mechanism differs by the language, but most languages use one or both of the following mechanisms: Use the ChromeOptions class. This is supported by Java, Python, etc.


2 Answers

List of common switches :
/master/chrome/common/chrome_switches.cc

List of headless switches :
/master/headless/app/headless_shell_switches.cc

To search other switches :
https://source.chromium.org/search?q=file:switches.cc&ss=chromium%2Fchromium%2Fsrc

List of preferences:
/master/chrome/common/pref_names.cc

like image 133
Florent B. Avatar answered Oct 17 '22 07:10

Florent B.


This is the one I use: http://peter.sh/experiments/chromium-command-line-switches/

var options = new ChromeOptions(); options.AddArgument("--start-maximized"); options.AddArgument("--ignore-certificate-errors"); options.AddArgument("--disable-popup-blocking"); options.AddArgument("--incognito"); 

and so forth :)

like image 38
Moe Ghafari Avatar answered Oct 17 '22 08:10

Moe Ghafari