Skip to end of metadata
Go to start of metadata

You can test websites using either Selenium or Appium. Selenium has better support for desktop devices, while Appium has better support for testing websites on mobile devices with native browsers. However, website testing against Android devices with Appium is only supported for Android versions 4.4 and higher.

All examples are for Java, but you can use our Platform Configurator to configure your tests in the language of your choice. 

Default Selenium Version

By default, Sauce Labs will use the following version of Selenium, depending on your selected combination of browser and operating system. While Selenium 3 is not yet fully implemented as a default version, it is supported for all Chrome and Firefox browsers on Mac and Windows platforms, for Safari 10+ on macOS 10.12 Sierra, and for Microsoft Edge and IE browsers version 10 and above. Currently Sauce Labs supports Selenium 3.4.0+ for Firefox and Safari and Selenium 3.5.0+ for Microsoft Edge and Chrome.

Browser NameDefault Selenium Version
Microsoft Edge2.52.0
Chrome

Latest Chromedriver

Firefox

Dev: 3.4.0

Beta: 3.4.0

53+: 3.4.0

39+: 2.53.1

Safari

11.0: 3.4.0

< 11.0: 2.48.0

Internet Explorer2.53.1

You can set the Selenium version for your tests by using the seleniumVersion desired capability:

'seleniumVersion' = '3.8.1'


Selenium Mobile and Desktop Browser Test Configuration Examples

With Selenium you can test against both desktop and mobile devices, though there are limitations with Android versions and devices. 

PC/Windows/IE

DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
caps.setCapability("platform", "Windows 8.1");
caps.setCapability("version", "11.0");

PC/Linux/Chrome 

DesiredCapabilities caps = DesiredCapabilities.chrome();
caps.setCapability("platform", "Linux");
caps.setCapability("version", "47.0");

Mac/OSX/Safari

DesiredCapabilities caps = DesiredCapabilities.safari();
caps.setCapability("platform", "OS X 10.9");
caps.setCapability("version", "7.0");

Android Emulator Phone/Android 5.1

DesiredCapabilities caps = DesiredCapabilities.android();
caps.setCapability("platform", "Linux");
caps.setCapability("version", "5.1");
caps.setCapability("deviceName","Android Emulator");
caps.setCapability("deviceType","phone");
caps.setCapability("deviceOrientation", "portrait");

Samsung Galaxy S3 Emulator/Android 4.4

DesiredCapabilities caps = DesiredCapabilities.android();
caps.setCapability("platform", "Linux");
caps.setCapability("version", "4.4");
caps.setCapability("deviceName","Samsung Galaxy S3 Emulator");
caps.setCapability("deviceOrientation", "portrait");

Appium Mobile and Desktop Browser Test Configuration Examples

iPhone

DesiredCapabilities caps = DesiredCapabilities.iphone();
caps.setCapability("appiumVersion", "1.5.1");
caps.setCapability("deviceName","iPhone 6");
caps.setCapability("deviceOrientation", "portrait");
caps.setCapability("platformVersion","8.4");
caps.setCapability("platformName", "iOS");
caps.setCapability("browserName", "Safari");

iPad

DesiredCapabilities caps = DesiredCapabilities.iphone();
caps.setCapability("appiumVersion", "1.5.1");
caps.setCapability("deviceName","iPad Retina");
caps.setCapability("deviceOrientation", "portrait");
caps.setCapability("platformVersion","8.4");
caps.setCapability("platformName", "iOS");
caps.setCapability("browserName", "Safari");

Android Phone Emulator/Android 4.4

DesiredCapabilities caps = DesiredCapabilities.android();
caps.setCapability("appiumVersion", "1.5.1");
caps.setCapability("deviceName","Android Emulator");
caps.setCapability("deviceType","phone");
caps.setCapability("deviceOrientation", "portrait");
caps.setCapability("browserName", "Browser");
caps.setCapability("platformVersion", "4.4");
caps.setCapability("platformName","Android");

iPhone 6 Real Device

{
deviceName:'iPhone 6 Device',
platformName:'iOS',
platformVersion:'8.0',
browserName:'Safari',
"appium-version":"1.5.1"
}

Samsung Galaxy S5 Real Device

{
deviceName:'Samsung Galaxy S5 Device',
platformName:'Android',
platformVersion:'4.4',
browserName:'Chrome',
name:'S5 real device google.com'
}

Samsung Galaxy S4 Real Device

{
deviceName:'Samsung Galaxy S4 Device',
platformName:'Android',
platformVersion:'4.4',
browserName:'Chrome',
name:'S5 real device google.com'
}

  • No labels