Skip to content

Commit

Permalink
New Firefox browser type for #223
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Nov 13, 2015
1 parent 943d602 commit 8729403
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/canopy/canopy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,9 @@ let start b =
| ChromeWithOptionsAndTimeSpan(options, timeSpan) -> new Chrome.ChromeDriver(chromeDir, options, timeSpan) :> IWebDriver
| Firefox -> new FirefoxDriver() :> IWebDriver
| FirefoxWithProfile profile -> new FirefoxDriver(profile) :> IWebDriver
| FirefoxWithPath path -> new FirefoxDriver(Firefox.FirefoxBinary(path), Firefox.FirefoxProfile()) :> IWebDriver
| FirefoxWithPath path -> new FirefoxDriver(new Firefox.FirefoxBinary(path), Firefox.FirefoxProfile()) :> IWebDriver
| FirefoxWithUserAgent userAgent -> firefoxWithUserAgent userAgent
| FirefoxWithPathAndTimeSpan(path, timespan) -> new FirefoxDriver(new Firefox.FirefoxBinary(path), Firefox.FirefoxProfile(), timespan) :> IWebDriver
| Safari ->new Safari.SafariDriver() :> IWebDriver
| PhantomJS ->
autoPinBrowserRightOnLaunch <- false
Expand Down
3 changes: 2 additions & 1 deletion src/canopy/reporters.fs
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ type LiveHtmlReporter(browser : BrowserStartMode, driverPath : string) =
| ChromeWithOptionsAndTimeSpan(options, timeSpan) -> new OpenQA.Selenium.Chrome.ChromeDriver(driverPath, options, timeSpan) :> IWebDriver
| Firefox -> new OpenQA.Selenium.Firefox.FirefoxDriver() :> IWebDriver
| FirefoxWithProfile profile -> new OpenQA.Selenium.Firefox.FirefoxDriver(profile) :> IWebDriver
| FirefoxWithPath path -> new OpenQA.Selenium.Firefox.FirefoxDriver(Firefox.FirefoxBinary(path), Firefox.FirefoxProfile()) :> IWebDriver
| FirefoxWithPath path -> new OpenQA.Selenium.Firefox.FirefoxDriver(new Firefox.FirefoxBinary(path), Firefox.FirefoxProfile()) :> IWebDriver
| ChromeWithUserAgent userAgent -> raise(System.Exception("Sorry ChromeWithUserAgent can't be used for LiveHtmlReporter"))
| FirefoxWithUserAgent userAgent -> raise(System.Exception("Sorry FirefoxWithUserAgent can't be used for LiveHtmlReporter"))
| FirefoxWithPathAndTimeSpan(path, timespan) -> new OpenQA.Selenium.Firefox.FirefoxDriver(new Firefox.FirefoxBinary(path), Firefox.FirefoxProfile(), timespan) :> IWebDriver
| Safari -> new OpenQA.Selenium.Safari.SafariDriver() :> IWebDriver
| PhantomJS | PhantomJSProxyNone -> raise(System.Exception("Sorry PhantomJS can't be used for LiveHtmlReporter"))
| Remote(_,_) -> raise(System.Exception("Sorry Remote can't be used for LiveHtmlReporter"))
Expand Down
1 change: 1 addition & 0 deletions src/canopy/types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type BrowserStartMode =
| FirefoxWithProfile of Firefox.FirefoxProfile
| FirefoxWithPath of string
| FirefoxWithUserAgent of string
| FirefoxWithPathAndTimeSpan of string * TimeSpan
| IE
| IEWithOptions of IE.InternetExplorerOptions
| IEWithOptionsAndTimeSpan of IE.InternetExplorerOptions * TimeSpan
Expand Down

0 comments on commit 8729403

Please sign in to comment.