Skip to content

Latest commit

 

History

History
95 lines (65 loc) · 2.15 KB

README.md

File metadata and controls

95 lines (65 loc) · 2.15 KB

Getting started with WebdriverIO + Mocha

Prerequisites

  • OSX Ventura with Git and Brew
  • Linux with bash curl and git
  • Windows with NodeJS 18 (untested)
  • Sauce Labs Account

Run the demo

  • Install Node.js 18 on Mac:
brew install node@18
  • Install Node.js 18 on Linux:
curl -fsSLO https://deb.nodesource.com/nsolid_setup_deb.sh
chmod +x nsolid_setup_deb.sh
./nsolid_setup_deb.sh 18
apt-get install nodejs -y
  • Clone the repo:
git clone https://github.com/saucelabs/visual-examples
cd visual-examples/wdio
  • install npm dependencies:
npm install
export SAUCE_USERNAME=__YOUR_SAUCE_USER_NAME__
export SAUCE_ACCESS_KEY=__YOUR_SAUCE_ACCESS_KEY__
# to change the region you are testing in please change the `hostname property in the wdio.conf.ts file
  • Run the test

desktop

npm run sauce-visual

or mobile

npm run sauce-visual-mobile

desktop

npm run sauce-visual-check

or mobile

npm run sauce-visual-check-mobile

NOTE: By default the tests will be executed on the US DC, if you want to run them on the EU DC then please run the following command

SAUCE_REGION=eu-central-1 npm run sauce-visual

or

SAUCE_REGION=eu-central-1 npm run sauce-visual-check

Installation & Usage

View installation and usage instructions on the Sauce Docs website.