[英]Selenium testing on iPhone with SauceLabs in Javascript
How to do end-to-end testing for iPhones, using Selenium and SauceLabs, for a Javascript application? 对于Javascript应用程序,如何使用Selenium和SauceLabs对iPhone进行端到端测试? I am using wd.js as a Selenium client library. 我使用wd.js作为Selenium客户端库。
Be browser
the result of require("wd").remote(..., "promiseChain")
: 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()
This results in: 这导致:
{ [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' }
However the combination is taken directly from https://saucelabs.com/platforms 但是,该组合直接来自https://saucelabs.com/platforms
Everything works fine for all other combinations, including Android ones. 一切都适用于所有其他组合,包括Android组合。
需要删除deviceName
属性,然后才能工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.