Command Line output:
$ ./webdriver [test_url] --browserstack [username],[key] --cap os="OS X" --cap os_version=Mojave --cap browser=Safari --cap browser_version=12.0
Launching local tunnel to BrowserStack: [username]
[ERROR] Setup failed: Error: Error while opening project page: UnsupportedOperationError: Parameter 'x' has a boolean value, which is not allowed.
Closing BrowserStack tunnel
Relevant code from siesta-launcher-all.js:
open : function (url, callback) {
var me = this
var driver = me.driver
driver.get(url).then(function () {
// setPosition also updates window size (on MacOS) for some reason, so, on MacOS it must be done before setSize
// on other platforms its the opposite
//return me.launcher.isMacOS ? driver.manage().window().setPosition(1, 1) : Promise.resolve()
return driver.manage().window().setPosition(1, 1);
}).then(function () {
return driver.manage().window().setSize(me.width - 1, me.height - 1)
}).then(function () {
return Promise.resolve()
// return !me.launcher.isMacOS ? driver.manage().window().setPosition(1, 1) : Promise.resolve()
}).then(function () {
callback()
}, function (e) {
callback(e)
})
},
What was happening here is that the system where ./webdriver was called determines isMacOS / isWindows / isLinux / etc. Since we’re calling our BrowserStack tests from a Linux system, isLinux will always be true regardless of the OS / browser user on BrowserStack.
However, even when I changed the source so that setPosition was always called before setSize (as the comments indicate is the correct order for Mac OS), I got the same error of “Parameter 'x' has a boolean value, which is not allowed.” So it seems setPosition(1,1) doesn't work with Safari.
In order to get Safari BrowserStack runs to work, I modified the source to skip the setPosition(1,1) call when the OS / browser specified via capabilities was OS X Safari but maintained the same behavior as the original source in all other cases. Now all the OS / browser combinations we are testing via BrowserStack are working without error. Hopefully this helps anyone who comes across similar issues.