私は f# テスト ライブラリの Canopy を使用しており、うまく機能します。しかし、ブラウザスタック上のブラウザをターゲットにする方法がわかりません。私はこれを見つけましたが、可能でした。
1 に答える
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()
于 2016-01-18T16:57:45.773 に答える