How to do end-to-end testing for iPhones, using Selenium and SauceLabs, for a Javascript application? I am using wd.js as a Selenium client library.
Be browser the result of 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
Everything works fine for all other combinations, including Android ones.
The deviceName property needs to be removed, then it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With