F# 如何使用带Browserstack的天篷

F# 如何使用带Browserstack的天篷,f#,canopy-web-testing,F#,Canopy Web Testing,我曾经使用过f#测试库Corporation,它工作得很好。但我不知道如何让它在浏览器堆栈上以浏览器为目标。我确实发现了这一点,但这是可能的 //Import the required libraries open canopy open runner open System open OpenQA.Selenium open OpenQA.Selenium.Remote //Set the BrowserStack specific capabilities let capability

我曾经使用过f#测试库Corporation,它工作得很好。但我不知道如何让它在浏览器堆栈上以浏览器为目标。我确实发现了这一点,但这是可能的

//Import the required libraries
open canopy
open runner
open System
open OpenQA.Selenium
open OpenQA.Selenium.Remote

//Set the BrowserStack specific capabilities 
let capability = new DesiredCapabilities()
capability.SetCapability("browserstack.user", "username")
capability.SetCapability("browserstack.key", "accesskey")
capability.SetCapability("os", "Windows")
capability.SetCapability("os_version", "7")
capability.SetCapability("browser", "Chrome")
capability.SetCapability("browser_version", "46.0")

//Setup Remote WebDriver to run on BrowserStack
let remote = Remote("http://hub.browserstack.com/wd/hub/", capability)

//Start the browser 
start remote

//Put your tests here

//Run all tests
run()

//close the driver
quit()