jsnoob
jsnoob

Reputation: 11

Sauce labs "invalid platform" after rest API request

I have some issue with Sauce Labs testing by REST API, there is a command which i use:

$ curl -X POST https://saucelabs.com/rest/v1/username/js-tests -u username:key -d platforms='[["Windows 8.1", "chrome", "44.0"], ["Windows 8.1", "firefox", "39.0"], ["Windows 8.1", "internet explorer", "11.0"], ["Windows 8", "internet explorer", "10.0"], ["Windows 7", "internet explorer", "9.0"], ["OS X 10.10", "safari", "8.0"], ["OS X 10.11", "safari", "8.1"], ["Linux", "chrome", "44.0"], ["Linux", "firefox", "39.0"]]' -d url="http://test-page.html" -d framework=mocha -d name=name -d passed=true -d public=public -d build=20

It works great. But if i try to add some mobile device to the platform list, it cause some issue:

["iOS", "iphone", "8.4", "iPhone Simulator"]
["Android", "android", "5.1", "AndroidEmulator"]

this case cause a message Resolution you specified is not available for this OS/browser/version/device combo

So i try to specify a screen resolution:

["iOS", "iphone", "8.4", "iPhone Simulator", "1024x768"] 
["Android", "android", "5.1", "AndroidEmulator", "1024x768"]

// or

["iOS", "iphone", "8.4", "iPhone Simulator", "portrait"] 
["Android", "android", "5.1", "AndroidEmulator", "portrait"]

And this case cause a message "Invalid platform '['iOS', 'iphone', '8.4', 'iPhone Simulator', 'portrait']"

So how i could add this two platforms to my platform list?

Upvotes: 0

Views: 179

Answers (1)

jsnoob
jsnoob

Reputation: 11

I have use invalid format. There is valid:

["iOS", "iphone", "8.4"] 
["Android", "android", "5.1"]

Upvotes: 0

Related Questions