Skip to content

Commit

Permalink
Fixed for #405, bad error messages for some actions when browser is null
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Mar 3, 2018
1 parent e1ae31d commit 283dd19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/canopy/canopy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ let rec private findElements cssSelector (searchContext : ISearchContext) : IWeb
with | ex -> []

let private findByFunction cssSelector timeout waitFunc searchContext reliable =
if browser = null then raise (CanopyNoBrowserException("Can't perform the action because the browser instance is null. `start chrome` to start a new browser."))
if wipTest then colorizeAndSleep cssSelector

try
Expand Down
1 change: 1 addition & 0 deletions src/canopy/types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type CanopyCheckFailedException(message) = inherit CanopyException(message)
type CanopyUncheckFailedException(message) = inherit CanopyException(message)
type CanopyReadException(message) = inherit CanopyException(message)
type CanopySkipTestException() = inherit CanopyException(String.Empty)
type CanopyNoBrowserException(message) = inherit CanopyException(message)

//directions
type direction =
Expand Down

0 comments on commit 283dd19

Please sign in to comment.