From 6e836a1ae562006cb3690e61b248ac82c5b7eeef Mon Sep 17 00:00:00 2001 From: George Kinsman Date: Tue, 3 Sep 2013 14:48:56 +1000 Subject: [PATCH] Convert canopy to use sizzle selector engine instead of normal WebDriver By.CssSelector. --- canopy/canopy.fs | 3 ++- canopy/canopy.fsproj | 8 ++++++++ canopy/packages.config | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/canopy/canopy.fs b/canopy/canopy.fs index b15021f7..d0620eb5 100644 --- a/canopy/canopy.fs +++ b/canopy/canopy.fs @@ -5,6 +5,7 @@ open OpenQA.Selenium.Firefox open OpenQA.Selenium open OpenQA.Selenium.Support.UI open OpenQA.Selenium.Interactions +open SizSelCsZzz open Microsoft.FSharp.Core.Printf open System.IO open System @@ -143,7 +144,7 @@ let waitFor (f : unit -> bool) = //find related let private findByCss cssSelector f = try - f(By.CssSelector(cssSelector)) |> List.ofSeq + f(BySizzle.CssSelector(cssSelector)) |> List.ofSeq with | ex -> [] let private findByXpath xpath f = diff --git a/canopy/canopy.fsproj b/canopy/canopy.fsproj index 2f9d8cce..9e226d91 100644 --- a/canopy/canopy.fsproj +++ b/canopy/canopy.fsproj @@ -55,6 +55,14 @@ + + ..\..\packages\Newtonsoft.Json.5.0.6\lib\net40\Newtonsoft.Json.dll + True + + + ..\..\packages\SizSelCsZzz.0.3.34.0\lib\SizSelCsZzz.dll + True + diff --git a/canopy/packages.config b/canopy/packages.config index b334cd50..6179ef48 100644 --- a/canopy/packages.config +++ b/canopy/packages.config @@ -1,5 +1,7 @@  + + \ No newline at end of file