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.
Asked
Active
Viewed 320 times
1 Answers
5
//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()

9ikhan
- 1,177
- 3
- 11
- 22