---
title: Creating a Selenium test from scratch | TestingBot Blog
description: In this blogpost we'll talk about creating your first Selenium test,
  running the test on your own computer and then later run it on several browser...
source_url:
  html: https://testingbot.com/blog/2011/12/27/creating-a-selenium-test-from-scratch
  md: https://testingbot.com/blog/2011/12/27/creating-a-selenium-test-from-scratch.md
---

# How to create a Selenium test

By [Jochen D.](https://testingbot.com/about/jochen-d)2011-12-27

 Share on Facebook 

 Share on Twitter 

 Post on Reddit 

 Share link 

In this blogpost we'll talk about creating your first Selenium test, running the test on your own computer and then later run it on several browsers at once. It shouldn't be too hard to follow along, but if you have any questions or remarks, please leave a comment.

## Prerequisites

Before we can create a test, we first need a website and an idea of what to test on the website. Let's say we have an e-commerce website selling products.

An important part of your e-commerce website is the shopping cart, this virtual cart keeps track of the products the visitor indicated he/she wants to purchase. If this shopping cart functionality should fail, for whatever reason (bug, code changes, human error, ...) the owner of the website will immediately start losing money and customers.

In an effort to prevent this, we decide to create a functional test with Selenium to verify if the shopping cart is still functioning like it should.

The first thing we need is to download the [Selenium IDE addon](https://www.selenium.dev/downloads/) for Firefox. It will help us in creating our first Selenium test.

The IDE has a function to record your browsing activity. All you need to do is launch the addon, click the record button and start performing actions.

## Our first test

In our case, we would click the record button, go to our e-commerce website and click `Add to cart` on a specific product. We'll then go to the shopping cart page and verify if our product is in the cart. Right click the title of the product in the cart and select `verifyTextPresent`. This will verify if the product is in fact in our cart.

Stop the recording of the test. Your first Selenium test is ready! You can now choose to run this test in your browser. It will mimic the actions you just performed and verify that the product is in fact in your shopping cart.

We could stop here and run this test manually every time we want to test our shopping cart. But what about other browsers, maybe the cart is broken in Internet Explorer, a browser used by a lot of people.

## Run your test on multiple browsers

That's where TestingBot.com shines. You simply add your test to our website, choose which browsers you want to run it on and how many times per day/week/month. We run the tests for you on the browsers you want. If a test should fail, we'll alert you so you know that something is wrong with your shopping cart.

You can then fix the problem without losing visitors and revenue.

## Screencast

We've made a screencast of the above example so you can follow along easily:

https://www.youtube.com/embed/IQ025lw6zMo?rel=0

[← Previous post NodeJS support for Selenium testing on TestingBot](https://testingbot.com/blog/2011/12/26/nodejs-support-for-selenium-testing-on-testingbot) [Next post → Selenium SSL/HTTPs support](https://testingbot.com/blog/2012/01/02/selenium-sslhttps-support)

## Sidebar

### TestingBot Cloud Testing

Run automated, manual and visual tests on remote browsers and devices. Sign up for a free trial.

[Free Trial](https://testingbot.com/users/sign_up)

### Latest articles

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights)

#### Announcing AI Test Insights

Use AI Insights to quickly discover why an automated test...

[Read: Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright)

#### Selenium vs Playwright 2026

Comparing Selenium vs Playwright - which is the best test...

[Read: Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing)

#### Maestro Physical Device Testing

Maestro testing in parallel on physical Android and iOS d...

[Read: Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

## Related Articles

[![Selenium vs Playwright 2026](https://testingbot.com/assets/blog/2026/selenium-vs-playwright-2026.jpg)](https://testingbot.com/blog/selenium-vs-playwright "Selenium vs Playwright 2026")

### [Selenium vs Playwright 2026](https://testingbot.com/blog/selenium-vs-playwright)

Comparing Selenium vs Playwright - which is the best test framework for your usecase?

[Read article →](https://testingbot.com/blog/selenium-vs-playwright)

[![Selenium 20th birthday](https://testingbot.com/assets/blog/2024/selenium20.webp)](https://testingbot.com/blog/selenium-20-years "Selenium 20th birthday")

### [Selenium 20th birthday](https://testingbot.com/blog/selenium-20-years)

Celebrate Selenium's 20th birthday. An overview of the years.

[Read article →](https://testingbot.com/blog/selenium-20-years)

[![Selenium WebDriver BiDi](https://testingbot.com/assets/blog/2024/bidi.webp)](https://testingbot.com/blog/webdriver-bidi "Selenium WebDriver BiDi")

### [Selenium WebDriver BiDi](https://testingbot.com/blog/webdriver-bidi)

WebDriver BiDi support is now available on TestingBot. Learn how to use this exciting new improvement with your Selenium tests.

[Read article →](https://testingbot.com/blog/webdriver-bidi)

[![Playwright Testing on TestingBot](https://testingbot.com/assets/blog/2023/playwright-testing.jpg)](https://testingbot.com/blog/playwright-testing-introduction "Playwright Testing on TestingBot")

### [Playwright Testing on TestingBot](https://testingbot.com/blog/playwright-testing-introduction)

Learn how Playwright can run your automated tests on a variety of browsers, local or remote browsers on TestingBot.

[Read article →](https://testingbot.com/blog/playwright-testing-introduction)

## More by Jochen D.

[![Announcing AI Test Insights](https://testingbot.com/assets/blog/2026/ai-insights.jpg)](https://testingbot.com/blog/ai-test-insights "Announcing AI Test Insights")
### [Announcing AI Test Insights](https://testingbot.com/blog/ai-test-insights)

Use AI Insights to quickly discover why an automated test failed.

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing "Maestro Physical Device Testing")
### [Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

Maestro testing in parallel on physical Android and iOS devices.

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing "tvOS Physical Device Testing")
### [tvOS Physical Device Testing](https://testingbot.com/blog/tvos-automated-testing)

Run automated tvOS tests on physical AppleTV devices.

[See all posts by Jochen D. →](https://testingbot.com/about/jochen-d)

## Ready to start testing?
[Start a free trial](https://testingbot.com/users/sign_up)
