Skip to content

Commit

Permalink
disable extensions in chrome to fix #289
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Sep 15, 2016
1 parent 09f9a96 commit b99ff70
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/canopy/canopy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -798,13 +798,15 @@ let start b =
| EdgeBETA -> new Edge.EdgeDriver(edgeDir) :> IWebDriver
| Chrome ->
let options = OpenQA.Selenium.Chrome.ChromeOptions()
options.AddArguments("--disable-extensions")
options.AddArgument("test-type") //https://code.google.com/p/chromedriver/issues/detail?id=799
new Chrome.ChromeDriver(chromeDir, options) :> IWebDriver
| ChromeWithOptions options -> new Chrome.ChromeDriver(chromeDir, options) :> IWebDriver
| ChromeWithUserAgent userAgent -> chromeWithUserAgent userAgent
| ChromeWithOptionsAndTimeSpan(options, timeSpan) -> new Chrome.ChromeDriver(chromeDir, options, timeSpan) :> IWebDriver
| Chromium ->
let options = OpenQA.Selenium.Chrome.ChromeOptions()
options.AddArguments("--disable-extensions")
options.AddArgument("test-type") //https://code.google.com/p/chromedriver/issues/detail?id=799
new Chrome.ChromeDriver(chromiumDir, options) :> IWebDriver
| ChromiumWithOptions options -> new Chrome.ChromeDriver(chromiumDir, options) :> IWebDriver
Expand Down Expand Up @@ -875,7 +877,7 @@ let positionBrowser left top width height =

browser.Manage().Window.Size <- new System.Drawing.Size(bw, bh)
browser.Manage().Window.Position <- new System.Drawing.Point(x, y)


let private innerSize() =
let jsBrowser = browser :?> IJavaScriptExecutor
Expand Down Expand Up @@ -1012,6 +1014,6 @@ let text = addSelector findByText "text"
(* documented/actions *)
let value = addSelector findByValue "value"

let skip message =
let skip message =
describe <| sprintf "Skipped: %s" message
raise <| CanopySkipTestException()
raise <| CanopySkipTestException()

0 comments on commit b99ff70

Please sign in to comment.