As a tester,
I would like to study a list of possible configuration arguments for Firefox and Chrome,
So that I can configure my testing tools with knowledge
Reading API indicates that there are methods with whom we can pass arguments to a webdriver instance:
FirefoxOptions.AddArgument
FirefoxOptions.SetLoggingPreference (inherited from DriverOptions)
FirefoxOptions.SetPreference
What exactly can be the possible arguments passed to these methods and what they do ?
Is there a resource online with a detailed list per each browser ?
In the Menu bar at the top of the screen, click Firefox and select Preferences. Click the menu button. and select Settings.
FirefoxOptions options = new FirefoxOptions(); driver = new RemoteWebDriver(new URL("http://10.x.x.x:4444/wd/hub"), options); When you start your Selenium Nodes, it displays a log information on using new FirefoxOptions preferred to 'DesiredCapabilities. firefox() along with all other browser options.
The moz:firefoxOptions capability is a namespaced set of capabilities specific to Firefox. It is used to control the behavior of Firefox and can be used as a member of alwaysMatch or as a member of one of the firstMatch entries.
Resources for Firefox:
http://kb.mozillazine.org/About:config_entries
http://kb.mozillazine.org/Category:Preferences
Example usage:
firefoxProfile.setPreference("app.update.enabled", false);
Resources for Chrome:
https://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/chrome_switches.cc?view=markup
Example usage:
chromeOptions.addArguments("--start-maximized");
I`m currently using following arguments in Chrome. Hope this would help someone. The names of the arguments are easy to understand since it makes sense.
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
chromeOptions.addArguments("start-maximized");
chromeOptions.addArguments("--disable-gpu");
chromeOptions.addArguments("--start-fullscreen");
chromeOptions.addArguments("--disable-extensions");
chromeOptions.addArguments("--disable-popup-blocking");
chromeOptions.addArguments("--disable-notifications");
chromeOptions.addArguments("--window-size=1920,1080");
chromeOptions.addArguments("--no-sandbox");
chromeOptions.addArguments("--dns-prefetch-disable");
chromeOptions.addArguments("enable-automation");
chromeOptions.addArguments("disable-features=NetworkService");
WebDriver driver = new ChromeDriver(chromeOptions);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With