canopy


Configuration

chromeDir

  • Directory for the chromedriver
  • Defaults to pre-set OS paths O* SX: /usr/bin/
  • Windows: C:\
1: 
chromeDir <- "C:\\"

chromiumDir

  • Directory for the chromedriver for use with chromium
  • Defaults to pre-set OS paths *nix: /usr/lib/chromium-browser
  • Windows: C:\
1: 
chromeDir <- "C:\\"

ieDir

  • Directory for Internet Explorer
  • Defaults to pre-set OS paths
  • OSX: /usr/bin/
  • Windows: C:\
1: 
ieDir <- "C:\\"

phantomJSDir

  • Directory for phantomJS
  • Defaults to pre-set OS paths
  • OSX: /usr/bin/
  • Windows: C:\
1: 
phantomJSDir <- "C:\\"

safariDir

  • Directory for Safari
  • Defaults to pre-set OS paths
  • OSX: /usr/bin/
  • Windows: C:\
1: 
safariDir <- "C:\\"

edgeDir

  • Directory for edge driver
  • Defaults to C:\Program Files (x86)\Microsoft Web Driver\
1: 
edgeDir <- "C:\\"

hideCommandPromptWindow

  • Hide drivers command prompt window
  • Defaults to false
1: 
hideCommandPromptWindow <- true

elementTimeout

  • Amount of time for the test runner to search for an element.
  • Default is 10.0 seconds
1: 
elementTimeout <- 10.0

compareTimeout

  • Amount of time for the test runner to spend comparing elements.
  • Default is 10.0 seconds
1: 
compareTimeout <- 10.0

pageTimeout

  • Amount of time for the test runner to wait for the page to load.
  • Default is 10.0 seconds
1: 
pageTimeout <- 10.0

wipSleep

  • Amount of time to spend between WIP tests (Tests marked with &&&&)
  • Default is 1.0 seconds
1: 
wipSleep <- 1.0

runFailedContextsFirst

  • Runs failed contexts first if the test suite has already executed.
  • Defaults is false
1: 
runFailedContextsFirst <- false

failFast

  • Stop running test suite after one test fails.
  • Defaults is false
1: 
failFast := true

failScreenshotPath

  • The path to save screenshots that are taken on failure.
  • Defaults is AppData\canopy
1: 
failScreenshotPath <- "C:\path\to\screenshot\folder"

failScreenshotFileName

  • Function that is run to create the filename of screenshot.
  • Takes a test and a suite to be optionally used in name creation.
  • Defaults is Timestamp with format MMM-d_HH-mm-ss-fff
1: 
failScreenshotFileName <- fun test suite -> System.DateTime.Now.ToString("MMM-d_HH-mm")

reporter

  • Reporter object that will handle how logs should be stored.
  • Must inherit IReporter
  • Default is ConsoleReporter
1: 
reporter <- new reporters.ConsoleReporter() :> reporters.IReporter

disableSuggestOtherSelectors

  • Option that will disable selector suggestion if a selector fails to execute
  • Defaults is false
1: 
disableSuggestOtherSelectors <- false

autoPinBrowserRightOnLaunch

  • Automatically pins the browser to the right of the screen on launch
  • Default is true
1: 
autoPinBrowserRightOnLaunch <- true

throwIfMoreThanOneElement

  • Throws a CanopyMoreThanOneElementFoundException if more than one element is found using a selector
  • Default is false
1: 
throwIfMoreThanOneElement <- false

configuredFinders

  • Defines functions for finding elements based on selectors
  • Default is the following sequence
  • findByCss
  • findByValue
  • findByXpath
  • findByLabel
  • findByText
  • findByJQuery
1: 
configuredFinders <- finders.defaultFinders

writeToSelectWithOptionValue

  • Provided to preserve previous behaviour of not using the options value to write to a select
  • Default is true
1: 
writeToSelectWithOptionValue <- true

optimizeBySkippingIFrameCheck

  • If you need your tests to be faster and don't have any iframes you can turn this to true
  • Default is false
1: 
optimizeBySkippingIFrameCheck <- false

optimizeByDisablingCoverageReport

  • If you need your tests to be faster and don't use coverage report you can turn this to true
  • Default is false
1: 
optimizeByDisablingCoverageReport <- false

showInfoDiv

  • Allows information to be displayed on the browser when the puts function is called
  • Default is true
1: 
showInfoDiv <- true

failureScreenshotsEnabled

  • Enables/Disables automatic taking of screenshot on failures.
  • Default is true
1: 
failureScreenshotsEnabled <- false

skipAllTestsOnFailure

  • Like fail fast, but instead of not running tests, it skips them.
  • Default is false
1: 
skipAllTestsOnFailure <- true

skipRemainingTestsInContextOnFailure

  • Like skipAllTestsOnFailure, but only skip those in the current context.
  • Default is false
1: 
skipRemainingTestsInContextOnFailure <- true

skipNextTest

  • Skip the next test
  • Default is false
1: 
skipNextTest <- true

failureMessagesThatShoulBeTreatedAsSkip

  • Mark a failed test as skipped if it failed for any of the listed known reasons
  • Default is empty list
1: 
failureMessagesThatShoulBeTreatedAsSkip <- ["message 1"; "message 2"]
namespace canopy
module configuration

from canopy
val mutable chromeDir : string

Full name: canopy.configuration.chromeDir
val mutable ieDir : string

Full name: canopy.configuration.ieDir
val mutable phantomJSDir : string

Full name: canopy.configuration.phantomJSDir
val mutable safariDir : string

Full name: canopy.configuration.safariDir
val mutable edgeDir : string

Full name: canopy.configuration.edgeDir
val mutable hideCommandPromptWindow : bool

Full name: canopy.configuration.hideCommandPromptWindow
val mutable elementTimeout : float

Full name: canopy.configuration.elementTimeout
val mutable compareTimeout : float

Full name: canopy.configuration.compareTimeout
val mutable pageTimeout : float

Full name: canopy.configuration.pageTimeout
val mutable wipSleep : float

Full name: canopy.configuration.wipSleep
val mutable runFailedContextsFirst : bool

Full name: canopy.configuration.runFailedContextsFirst
val failFast : bool ref

Full name: canopy.configuration.failFast
val mutable failScreenshotPath : string

Full name: canopy.configuration.failScreenshotPath
val mutable failScreenshotFileName : (Test -> suite -> string)

Full name: canopy.configuration.failScreenshotFileName
val test : Test
Multiple items
val suite : suite

--------------------
type suite =
  new : unit -> suite
  member Clone : unit -> suite
  member After : (unit -> unit)
  member Always : Test list
  member Before : (unit -> unit)
  member Context : string
  member IsParallel : bool
  member Lastly : (unit -> unit)
  member Manys : Test list
  member OnFail : (unit -> unit)
  ...

Full name: canopy.types.suite

--------------------
new : unit -> suite
namespace System
Multiple items
type DateTime =
  struct
    new : ticks:int64 -> DateTime + 10 overloads
    member Add : value:TimeSpan -> DateTime
    member AddDays : value:float -> DateTime
    member AddHours : value:float -> DateTime
    member AddMilliseconds : value:float -> DateTime
    member AddMinutes : value:float -> DateTime
    member AddMonths : months:int -> DateTime
    member AddSeconds : value:float -> DateTime
    member AddTicks : value:int64 -> DateTime
    member AddYears : value:int -> DateTime
    ...
  end

Full name: System.DateTime

--------------------
System.DateTime()
   (+0 other overloads)
System.DateTime(ticks: int64) : unit
   (+0 other overloads)
System.DateTime(ticks: int64, kind: System.DateTimeKind) : unit
   (+0 other overloads)
System.DateTime(year: int, month: int, day: int) : unit
   (+0 other overloads)
System.DateTime(year: int, month: int, day: int, calendar: System.Globalization.Calendar) : unit
   (+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : unit
   (+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: System.DateTimeKind) : unit
   (+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: System.Globalization.Calendar) : unit
   (+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : unit
   (+0 other overloads)
System.DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: System.DateTimeKind) : unit
   (+0 other overloads)
property System.DateTime.Now: System.DateTime
System.DateTime.ToString() : string
System.DateTime.ToString(provider: System.IFormatProvider) : string
System.DateTime.ToString(format: string) : string
System.DateTime.ToString(format: string, provider: System.IFormatProvider) : string
val mutable reporter : reporters.IReporter

Full name: canopy.configuration.reporter
module reporters

from canopy
Multiple items
type ConsoleReporter =
  interface IReporter
  new : unit -> ConsoleReporter

Full name: canopy.reporters.ConsoleReporter

--------------------
new : unit -> reporters.ConsoleReporter
type IReporter =
  interface
    abstract member contextEnd : string -> unit
    abstract member contextStart : string -> unit
    abstract member coverage : string -> byte [] -> string -> unit
    abstract member describe : string -> unit
    abstract member fail : Exception -> string -> byte [] -> string -> unit
    abstract member pass : string -> unit
    abstract member quit : unit -> unit
    abstract member setEnvironment : string -> unit
    abstract member skip : string -> unit
    abstract member suggestSelectors : string -> string list -> unit
    ...
  end

Full name: canopy.reporters.IReporter
val mutable disableSuggestOtherSelectors : bool

Full name: canopy.configuration.disableSuggestOtherSelectors
val mutable autoPinBrowserRightOnLaunch : bool

Full name: canopy.configuration.autoPinBrowserRightOnLaunch
val mutable throwIfMoreThanOneElement : bool

Full name: canopy.configuration.throwIfMoreThanOneElement
val mutable configuredFinders : (string -> (OpenQA.Selenium.By -> System.Collections.ObjectModel.ReadOnlyCollection<OpenQA.Selenium.IWebElement>) -> seq<OpenQA.Selenium.IWebElement list>)

Full name: canopy.configuration.configuredFinders
module finders

from canopy
val mutable defaultFinders : (string -> (OpenQA.Selenium.By -> System.Collections.ObjectModel.ReadOnlyCollection<OpenQA.Selenium.IWebElement>) -> seq<OpenQA.Selenium.IWebElement list>)

Full name: canopy.finders.defaultFinders
val mutable writeToSelectWithOptionValue : bool

Full name: canopy.configuration.writeToSelectWithOptionValue
val mutable optimizeBySkippingIFrameCheck : bool

Full name: canopy.configuration.optimizeBySkippingIFrameCheck
val mutable optimizeByDisablingCoverageReport : bool

Full name: canopy.configuration.optimizeByDisablingCoverageReport
val mutable showInfoDiv : bool

Full name: canopy.configuration.showInfoDiv
val mutable failureScreenshotsEnabled : bool

Full name: canopy.configuration.failureScreenshotsEnabled
val mutable skipAllTestsOnFailure : bool

Full name: canopy.configuration.skipAllTestsOnFailure
val mutable skipRemainingTestsInContextOnFailure : bool

Full name: canopy.configuration.skipRemainingTestsInContextOnFailure
val mutable skipNextTest : bool

Full name: canopy.configuration.skipNextTest
val mutable failureMessagesThatShoulBeTreatedAsSkip : string list

Full name: canopy.configuration.failureMessagesThatShoulBeTreatedAsSkip