Skip to content

Commit

Permalink
Fix #315 add FirefoxWithProfileAndTimeSpan
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Dec 5, 2016
1 parent 4ec241c commit 7239f24
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/canopy/canopy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,10 @@ let start b =
let options = new Firefox.FirefoxOptions()
options.BrowserExecutableLocation <- path
new FirefoxDriver(FirefoxDriverService.CreateDefaultService(), options, timespan) :> IWebDriver
| FirefoxWithProfileAndTimeSpan(profile, timespan) ->
let options = new Firefox.FirefoxOptions()
options.Profile <- profile
new FirefoxDriver(FirefoxDriverService.CreateDefaultService(), options, timespan) :> IWebDriver
| Safari ->new Safari.SafariDriver() :> IWebDriver
| PhantomJS ->
autoPinBrowserRightOnLaunch <- false
Expand Down
4 changes: 4 additions & 0 deletions src/canopy/reporters.fs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ type LiveHtmlReporter(browser : BrowserStartMode, driverPath : string, ?pinBrows
let options = new Firefox.FirefoxOptions()
options.BrowserExecutableLocation <- path
new Firefox.FirefoxDriver(Firefox.FirefoxDriverService.CreateDefaultService(), options, timespan) :> IWebDriver
| FirefoxWithProfileAndTimeSpan(profile, timespan) ->
let options = new Firefox.FirefoxOptions()
options.Profile <- profile
new Firefox.FirefoxDriver(Firefox.FirefoxDriverService.CreateDefaultService(), options, timespan) :> IWebDriver
| Safari -> new 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 @@ -46,6 +46,7 @@ type BrowserStartMode =
| FirefoxWithPath of string
| FirefoxWithUserAgent of string
| FirefoxWithPathAndTimeSpan of string * TimeSpan
| FirefoxWithProfileAndTimeSpan of Firefox.FirefoxProfile * TimeSpan
| IE
| IEWithOptions of IE.InternetExplorerOptions
| IEWithOptionsAndTimeSpan of IE.InternetExplorerOptions * TimeSpan
Expand Down

0 comments on commit 7239f24

Please sign in to comment.