Skip to content

Commit

Permalink
Make clear before write configuralbe #236
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Feb 27, 2016
1 parent f748591 commit d6e4f0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/canopy/canopy.fs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ let private writeToElement (e : IWebElement) (text:string) =
let readonly = e.GetAttribute("readonly")
if readonly = "true" then
raise (CanopyReadOnlyException(sprintf "element %s is marked as read only, you can not write to read only elements" (e.ToString())))
try e.Clear() with ex -> ex |> ignore
if not optimizeByDisablingClearBeforeWrite then try e.Clear() with ex -> ex |> ignore
e.SendKeys(text)

let ( << ) item text =
Expand Down
1 change: 1 addition & 0 deletions src/canopy/configuration.fs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ let mutable configuredFinders = finders.defaultFinders
let mutable writeToSelectWithOptionValue = true
let mutable optimizeBySkippingIFrameCheck = false
let mutable optimizeByDisablingCoverageReport = false
let mutable optimizeByDisablingClearBeforeWrite = false
let mutable showInfoDiv = true
let mutable failureScreenshotsEnabled = true
let mutable skipAllTestsOnFailure = false
Expand Down

0 comments on commit d6e4f0c

Please sign in to comment.