简体   繁体   中英

How to use Canopy with Browserstack

I have been user the f# test library Canopy and it works great. But I can't figure out how to have it target browsers on browser stack. I did find this but so it is/was possible.

twitter.com/bryan_hunter/status/423352533877153792

//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() 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM