For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

Selenium With WD


Run WD tests on the TestMu AI cloud grid. This guide covers setup, running a sample test, configuring capabilities, and testing locally hosted pages.

Unmaintained Framework

The WD library is largely unmaintained. Consider migrating to WebDriverIO or Playwright. This guide is maintained for existing users.

Sample repo

All the code used in this guide is available in the sample repository.

Prerequisites​


Complete these steps before running WD Selenium tests on TestMu AI.

  1. Create a TestMu AI account and get your username and access key from the dashboard.
  2. Install NodeJS v6 or newer from nodejs.org.
  3. Install npm from the official npm website.
  4. Download Selenium JavaScript bindings from the official website.

Step 1: Clone the Sample Project​


Clone the TestMu AI WD Selenium sample repository to your local machine.

Verified
git clone https://github.com/LambdaTest/wd-selenium-sample
cd wd-selenium-sample

Install the required dependencies:

Verified
npm i

Step 2: Set Your Credentials​


Set your TestMu AI username and access key as environment variables.

Verified
export LT_USERNAME="undefined"
export LT_ACCESS_KEY="undefined"

Step 3: Configure Your Test Capabilities​


Update the capabilities in conf/single.conf.js to define the browser and platform settings.

Verified
capabilities: [{
browserName: 'chrome',
platform: 'Windows 10',
version: 'latest',
name: "single-test",
build: "wd-lambdatest-sample",
geoLocation : "US"
}]
tip

Generate capabilities for your test requirements with the Capabilities Generator.

Step 4: Run the Test​


Execute the test using the following command.

Single test:

Verified
npm run single

Parallel tests:

Verified
npm run parallel

Step 5: View Your Results​


After running the test, view your results on the TestMu AI Automation Dashboard.

The dashboard provides:

  • Video recordings of each test session
  • Screenshots captured at each step
  • Console logs from the browser
  • Network logs for debugging
  • Detailed command logs

Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

×
Schedule Your Personal Demo
Kane CLI terminal

Help and Support

Related Articles