Multi-Platform User Interface Testing with Selenium and Sauce Labs

Sauce Labs Platform Suite

Selenium for Node.js

Testing for React

import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
const expect = chai.expect;

import webdriver from 'selenium-webdriver';
import test from 'selenium-webdriver/testing';

Browser Capabilities

let capabilities = {
"Safari: El Capitan": {
'browserName': 'safari',
'platform': 'OS X 10.11',
'version': '10.0',
"Safari: Mavericks": {
'browserName': 'safari',
'platform': 'OS X 10.9',
'version': '7.0',
"Chrome: Windows 10": {
'browserName': 'chrome',
'platform': 'Windows 10',
'version': '54.0',
"IE: Windows 10": {
'browserName': 'internet explorer',
'platform': 'Windows 10',
'version': '11.103',
"Safari: iPhone5": {
'browserName': 'safari',
'platform': 'iOS',
'version': '8.1',
'deviceName': 'iPhone 5 Simulator',
'deviceOrientation': 'portrait',
'appiumVersion': '1.5.3',
"Android(Nexus)": {
'browserName': 'Browser',
'platformName': 'Android',
'platformVersion': '4.4',
'deviceName': 'Google Nexus 7C Emulator',
'deviceOrientation': 'portrait',
'appiumVersion': '1.5.3',

Build the Webdriver and Launch the Browser

Find Elements

Test UI Features

Multi-Platform UI Testing



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store