Skip to main content

Selenium Demonstration Scripts

The following examples illustrate test scripts written in difference programming languages that automate the successful login to the SauceDemo website, then confirm that the expected inventory page opens. The code in these samples is for demonstration only.

Ruby#

Visit the Sauce Labs Ruby Demonstration Repo for prerequisites, setup instructions, a variety of sample scripts, and many other resources related to writing and running Selenium scripts in Ruby.

Ruby Login Test
loading...

Python#

Visit the Sauce Labs Python Demonstration Repo for prerequisites, setup instructions, a variety of sample scripts, and many other resources related to writing and running Selenium scripts in Python.

Python Login Test
loading...

Java#

Visit the Sauce Labs Java Demonstration Repo for prerequisites, setup instructions, a variety of sample scripts, and many other resources related to writing and running Selenium scripts in Java.

JUnit 5 Selenium Example
loading...

NodeJS#

Visit the Sauce Labs JavaScript Demonstration Repo for prerequisites, setup instructions, a variety of sample scripts using different frameworks, and many other resources related to writing and running scripts in JavaScript.

WebdriverIO Login Test
loading...

C Sharp#

Visit the Sauce Labs C# Demonstration Repo for prerequisites, setup instructions, a variety of sample scripts, and many other resources related to writing and running scripts in C#.

C# Selenium Example
loading...