Skip to content

Commit

Permalink
Fix #355 Fix annoying 'disable developer extensions' in chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Apr 2, 2017
1 parent 54a13ff commit 3e89634
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/canopy/canopy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,8 @@ let start b =
| EdgeBETA -> new Edge.EdgeDriver(edgeDriverService ()) :> IWebDriver
| Chrome ->
let options = Chrome.ChromeOptions()
options.AddArguments("--disable-extensions")
options.AddArgument("--disable-extensions")
options.AddArgument("disable-infobars")
options.AddArgument("test-type") //https://code.google.com/p/chromedriver/issues/detail?id=799
new Chrome.ChromeDriver(chromeDriverService (), options) :> IWebDriver
| ChromeWithOptions options ->
Expand All @@ -846,7 +847,8 @@ let start b =
new Chrome.ChromeDriver(chromeDriverService (), options, timeSpan) :> IWebDriver
| Chromium ->
let options = Chrome.ChromeOptions()
options.AddArguments("--disable-extensions")
options.AddArgument("--disable-extensions")
options.AddArgument("disable-infobars")
options.AddArgument("test-type") //https://code.google.com/p/chromedriver/issues/detail?id=799
new Chrome.ChromeDriver(chromeDriverService (), options) :> IWebDriver
| ChromiumWithOptions options ->
Expand Down
3 changes: 2 additions & 1 deletion src/canopy/reporters.fs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ type LiveHtmlReporter(browser : BrowserStartMode, driverPath : string, ?pinBrows
| EdgeBETA -> new Edge.EdgeDriver(driverPath) :> IWebDriver
| Chrome | Chromium ->
let options = Chrome.ChromeOptions()
options.AddArgument("test-type") //https://code.google.com/p/chromedriver/issues/detail?id=799
options.AddArguments("--disable-extensions")
options.AddArgument("disable-infobars")
options.AddArgument("test-type") //https://code.google.com/p/chromedriver/issues/detail?id=799
new Chrome.ChromeDriver(driverPath, options) :> IWebDriver
| ChromeWithOptions options -> new Chrome.ChromeDriver(driverPath, options) :> IWebDriver
| ChromeWithOptionsAndTimeSpan(options, timeSpan) -> new Chrome.ChromeDriver(driverPath, options, timeSpan) :> IWebDriver
Expand Down

0 comments on commit 3e89634

Please sign in to comment.