Accelerate Multi-browser Testing Using Sauce Labs and Webdriver.io

Sauce AI for Test Authoring: Move from purpose to execution in transactions.|xBack to ResourcesBlogPos

March 23, 2026 · 3 min read · Testing Guide

Sauce AI for Test Authoring: Move from purpose to execution in transactions.

|

x

Back to Resources

Blog

Posted June 7, 2016

Accelerate Multi-browser Testing Using Sauce Labs and Webdriver.io

quote

Sahas will be presenting & quot; Design Patterns for Scalable Test Automation With Selenium & amp; WebdriverIO & quot; in our adjacent webinar on Wednesday, June 15th at 11:00AM PDT / 2:00PM EDT

There are a lot of webdriver-based testing frameworks out there.Webdriver.iois a comparatively new coolheaded kid on the block. It has enough to differentiate itself and facilitate us to focus on make reliable GUI tests. A few highlighting on what this framework comes with:

  1. Out-of-the-boxES 2015support - leverage all the goodness that ES6/ES2015 offers.

  2. Out-of-the-box promises support - This framework habituate Q.js internally, and every individual command typify a promise. The 2d command will be executed exclusively after the first command promise is decide.

  3. Out-of-the-box Sauce Labs contrabandist service - to run exam on Sauce Labs

  4. Out-of-the-box parallel test contrabandist (wdio) - to run tests across multiple OS/Browser mixture in parallel

  5. A rich set ofAPIsmakes the exam code short and concise

These advantages help organizations centre on their core province — to automate their verification procedure quickly instead of developing and maintaining usance libraries to support automation efforts (more productivity — we all love it).

For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users.

Design Pattern

Regardless of the tool of choice, I urge postdate the Page Object pattern for authentic exam. ES 2015 support do it leisurely to achieve that design. Tests will run on multiple platforms base on the configuration:

webdriverio fig1

Step 1: Define the UI Map

  • The UI map is used to enshroud HTML implementation from consuming Page Objects for easier maintenance.

  • Since webdriver.io supports ES 2015, we are using the class and getter method to access the elements.

webdriverio fig2

Step 2: Define Page Object APIs

Page Object allow APIs to perform action on the page, and provides access to the current province of the underlying page. In the implementation below, we import the UI map and expose the activeness (APIs) for the test.

webdriverio fig3

Step 3: Define Tests

In this example, we use Mocha (TDD style) for defining the tests, and Chai for assertions. Import the Page Object (using a little dependance injection here) and telephone those APIs to Navigate to Google and Search for an point.

webdriverio fig4

Step 4: Sauce Labs Integration

Create a config file and ply your Sauce Labs credentials:

webdriverio fig5

You can use the Sauce Labs to create the necessary configuration. The final configuration would look like:

webdriverio fig6

Step 5: Run Your Tests

Run this bidding from your tests directory:

node_modules/webdriverio/bin/wdio ./wdio.conf.sauce.js

The tests run inparallel, with results be update mechanically.

webdriverio fig7

Enjoy! This source code is available in myGitHubaccount for reference.Sahas Subramanian (@ sahaswaranamam) is a passionate engineer with experience spanning across DevOps, quality engineering, web development and consulting. He is presently working as a Continuous Delivery and Quality Architect @CDK Global, and shares his thoughts on tech viahttps: //cdinsight.wordpress.com

Published:
Jun 7, 2016
Share this post
Copy Share Link
LinkedIn
© 2026 Sauce Labs Inc., all rights reserved. SAUCE and SAUCE LABS are file trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.
robot
quote

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free