Skip to content

Sauce Labs

bootstraponline edited this page Nov 2, 2015 · 19 revisions

Random notes about browser testing on Sauce Labs

Element is not clickable at point

Chrome will only allow clicking on screen elements. On Sauce, this is difficult when the default screen resolution is very low. The solution is to use Windows or OS X < 10.9 and set the screen resolution. Linux is not currently supported. Note that driver calls to resize the window larger than the default screen resolution of 1024x768 won't work unless the screen res cap is set. The screen resolution must be higher than the requested browser size.

# ruby
driver.manage.window.resize_to 1024, 768

--

Running in parallel

--

Manually specify the version of Chrome on Sauce. Setting version to an empty string will default to version 35.

--

Set value on an input directly to avoid change event firing which happens on element.clear. Some apps require the change event to fire so this won't work universally.

# Code from stackoverflow
# http://stackoverflow.com/questions/25583641/set-value-of-input-instead-of-sendkeys-selenium-webdriver-nodejs
driver.execute_script("arguments[0].setAttribute('value', arguments[1])", inputField, longstring);

--

Mobile web on Sauce (selendroid via appium)

Android screen-resolution desired capability is locked at 1024x768. The page load timeout (driver.manage.timeouts.page_load) is not supported for Android. It's better to define a white list of supported browsers for the page_load timeout. driver.manage.window.resize_to is not supported in Selendroid.

Android emulators do not support executing JavaScript. It's not clear how to install a webdriver compliant browser (google chrome) on the Sauce emulators.

Selenium::WebDriver::Error::UnsupportedOperationError:
     underlying webdriver instance does not support javascript

Must whitelist appium specific caps or they won't be sent to Sauce.

config.whitelist 'deviceName'

appium iOS Safari simulator notes

--

New resolutions

Sauce expanded the available OS X resolutions in response to customer feedback. As of Nov 2 2015, there are two resolutions that work on all platforms. They are 1024x768 and 1280x1024.

Clone this wiki locally