From 6fc9f9dc75ac39bf29c522872adf43d2b949750b Mon Sep 17 00:00:00 2001 From: Chris Holt Date: Wed, 28 May 2014 22:49:37 -0500 Subject: [PATCH] Fix #153 --- src/canopy/canopy.fs | 5 ++++- src/canopy/reporters.fs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/canopy/canopy.fs b/src/canopy/canopy.fs index d7f7f867..4b1e0e73 100644 --- a/src/canopy/canopy.fs +++ b/src/canopy/canopy.fs @@ -638,7 +638,10 @@ let start b = | IE -> new IE.InternetExplorerDriver(ieDir) :> IWebDriver | IEWithOptions options -> new IE.InternetExplorerDriver(ieDir, options) :> IWebDriver | IEWithOptionsAndTimeSpan(options, timeSpan) -> new IE.InternetExplorerDriver(ieDir, options, timeSpan) :> IWebDriver - | Chrome -> new Chrome.ChromeDriver(chromeDir) :> IWebDriver + | Chrome -> + let options = OpenQA.Selenium.Chrome.ChromeOptions() + 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 diff --git a/src/canopy/reporters.fs b/src/canopy/reporters.fs index 99bada7d..924914c2 100644 --- a/src/canopy/reporters.fs +++ b/src/canopy/reporters.fs @@ -149,7 +149,10 @@ type LiveHtmlReporter(browser : BrowserStartMode, driverPath : string) = | IE -> new OpenQA.Selenium.IE.InternetExplorerDriver(driverPath) :> IWebDriver | IEWithOptions options ->new OpenQA.Selenium.IE.InternetExplorerDriver(driverPath, options) :> IWebDriver | IEWithOptionsAndTimeSpan(options, timeSpan) -> new OpenQA.Selenium.IE.InternetExplorerDriver(driverPath, options, timeSpan) :> IWebDriver - | Chrome -> new OpenQA.Selenium.Chrome.ChromeDriver(driverPath) :> IWebDriver + | Chrome -> + let options = OpenQA.Selenium.Chrome.ChromeOptions() + options.AddArgument("test-type") //https://code.google.com/p/chromedriver/issues/detail?id=799 + new OpenQA.Selenium.Chrome.ChromeDriver(driverPath, options) :> IWebDriver | ChromeWithOptions options -> new OpenQA.Selenium.Chrome.ChromeDriver(driverPath, options) :> IWebDriver | ChromeWithOptionsAndTimeSpan(options, timeSpan) -> new OpenQA.Selenium.Chrome.ChromeDriver(driverPath, options, timeSpan) :> IWebDriver | Firefox -> new OpenQA.Selenium.Firefox.FirefoxDriver() :> IWebDriver