[英]Selenium testing on iPhone with SauceLabs in Javascript
对于Javascript应用程序,如何使用Selenium和SauceLabs对iPhone进行端到端测试? 我使用wd.js作为Selenium客户端库。
browser
是require("wd").remote(..., "promiseChain")
的结果require("wd").remote(..., "promiseChain")
:
browser.init({
browserName: "iphone",
version: "4",
platform: "OS X 10.6",
deviceName: "iPhone",
"device-orientation": "portrait"
})
.sessionCapabilities()
.then(console.log.bind(console), console.log.bind(console))
.quit()
这导致:
{ [Error: [init({"browserName":"iphone","version":"4","platform":"OS X 10.6","deviceName":"iPhone","device-orientation":"portrait","record-video":false,"record-screenshots":false})] The environment you requested was unavailable.] data: 'Invalid device name specified: iPhone' }
但是,该组合直接来自https://saucelabs.com/platforms
一切都适用于所有其他组合,包括Android组合。
需要删除deviceName
属性,然后才能工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.