Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#I @"packages\Selenium.WebDriver\lib\net40"
#I @"packages\canopy\lib"
#I @"packages\FAKE\tools\"
#r "FakeLib.dll"
#r "canopy.dll"
#r "WebDriver.dll"
open System
open System.IO
open System.Net
open Fake
open ProcessHelper
open OpenQA.Selenium
open OpenQA.Selenium.Interactions
open canopy
let basePath p =
let seleniumDriversPath = basePath "selenium_drivers"
ensureDirectory seleniumDriversPath
let downloadChromeDriver () =
let zipPath = seleniumDriversPath @@ ""
if not <| File.Exists zipPath
let client = new WebClient()
let version = client.DownloadString("").Trim()
let chromeUrl = sprintf "" version
client.DownloadFile(chromeUrl, zipPath)
Unzip seleniumDriversPath zipPath
downloadChromeDriver ()
chromeDir <- seleniumDriversPath
start chrome
url ""
"input[name=q]" << "fsharp"
press enter
nuget "Install" "Canopy" "-OutputDirectory" "packages" "-ExcludeVersion"
nuget "Install" "FAKE" "-OutputDirectory" "packages" "-ExcludeVersion"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment