canopy


Configuration

driverHostName

  • .net core has a delay when resolving localhost that makes using canopy very slow
  • canopy uses 127.0.0.1 instead but allows you to adjust it based on your ipv/ipv6 needs
  • Defaults to "127.0.0.1"
1: 
2: 
driverHostName <- "localhost"
driverHostName <- "::1"

chromeDir

  • Directory for the chromedriver
  • Defaults executing directory (bin\Debug in many cases)
1: 
chromeDir <- @"C:\your\custom\path"

chromiumDir

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

firefoxDir

  • Install path for firefox
  • Defaults to pre-set OS paths
  • OSX: /Applications/Firefox.app/Contents/MacOS/firefox-bin
  • nix: /usr/lib/firefox-2.0 (probably wrong)
  • Windows: C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1: 
firefoxDir <- @"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"

firefoxDriverDir

  • Directory for the firefox gecko driver
  • Defaults executing directory (bin\Debug in many cases)
1: 
firefoxDriverDir <- @"C:\your\custom\path"

ieDir

  • Directory for Internet Explorer
  • Defaults executing directory (bin\Debug in many cases)
1: 
ieDir <- @"C:\your\custom\path"

safariDir

  • Directory for Safari
  • Defaults executing directory (bin\Debug in many cases)
1: 
safariDir <- @"C:\your\custom\path"

edgeDir

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

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

failIfAnyWipTests

  • Prevents accidentally allowing wip tests into the build pipeline.
  • Set to false locally so tests under development are not affected.
  • Set to true in your CI environment to catch wip tests that have been mistakenly commited to trunk/master.
  • Default is false
1: 
failIfAnyWipTests <- true

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

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

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 driverHostName : string

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

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

Full name: canopy.configuration.chromiumDir
val mutable firefoxDir : string

Full name: canopy.configuration.firefoxDir
val mutable firefoxDriverDir : string

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

Full name: canopy.configuration.ieDir
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 failIfAnyWipTests : bool

Full name: canopy.configuration.failIfAnyWipTests
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 : (types.Test -> types.suite -> string)

Full name: canopy.configuration.failScreenshotFileName
val test : types.Test
val suite : types.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 : types.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
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
module finders

from canopy
val mutable optimizeBySkippingIFrameCheck : bool

Full name: canopy.configuration.optimizeBySkippingIFrameCheck
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 failureMessagesThatShoulBeTreatedAsSkip : string list

Full name: canopy.configuration.failureMessagesThatShoulBeTreatedAsSkip