From 30c4a6ea1297b1c18bafbe0284d653f7dfa4a213 Mon Sep 17 00:00:00 2001 From: Kuniwak Date: Wed, 8 Jul 2015 17:39:45 +0900 Subject: [PATCH] Support Options#excludeSwitches --- selenium-webdriver/selenium-webdriver-tests.ts | 1 + selenium-webdriver/selenium-webdriver.d.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/selenium-webdriver/selenium-webdriver-tests.ts b/selenium-webdriver/selenium-webdriver-tests.ts index 73ea8561e..cbe4db926 100644 --- a/selenium-webdriver/selenium-webdriver-tests.ts +++ b/selenium-webdriver/selenium-webdriver-tests.ts @@ -14,6 +14,7 @@ function TestChromeOptions() { options = options.addArguments("a", "b", "c"); options = options.addExtensions("a", "b", "c"); + options = options.excludeSwitches("a", "b", "c"); options = options.detachDriver(true); options = options.setChromeBinaryPath("path"); options = options.setChromeLogFile("logfile"); diff --git a/selenium-webdriver/selenium-webdriver.d.ts b/selenium-webdriver/selenium-webdriver.d.ts index c4af933c9..c48f16af0 100644 --- a/selenium-webdriver/selenium-webdriver.d.ts +++ b/selenium-webdriver/selenium-webdriver.d.ts @@ -62,6 +62,16 @@ declare module chrome { addArguments(...var_args: string[]): Options; + /** + * List of Chrome command line switches to exclude that ChromeDriver by default + * passes when starting Chrome. Do not prefix switches with "--". + * + * @param {...(string|!Array)} var_args The switches to exclude. + * @return {!Options} A self reference. + */ + excludeSwitches(...var_args: string[]): Options; + + /** * Add additional extensions to install when launching Chrome. Each extension * should be specified as the path to the packed CRX file, or a Buffer for an