---
title: How does a Selenium test work? | TestingBot Blog
description: |-
  Selenium is the industry standard for automatically testing websites in browsers.
  A selenium test is a set of instructions that will be sent to a b...
source_url:
  html: https://testingbot.com/blog/2011/12/07/how-does-a-selenium-test-work
  md: https://testingbot.com/blog/2011/12/07/how-does-a-selenium-test-work.md
---

# Anatomy of a Selenium Test

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

 Share on Facebook 

 Share on Twitter 

 Post on Reddit 

 Share link 

Selenium is the industry standard for automatically testing websites in browsers. A selenium test is a set of instructions that will be sent to a browser of your choice.

Most major programming language offer support for Selenium. Either by plugins or by default. These plugins will translate language specific syntax to Selenium commands which can be understood by a Selenium Grid.

For example, let's say we want a test where we will test Google on Firefox. We want to check if the title of the homepage on Google is "Google".

We start of by specifying which browser we want to use. In Selenese (the syntax used by Selenium), we would use the command `getNewBrowserSession` together with the options: Firefox and browser version.

This command is sent to the Selenium grid, which is managed by a hub. The hub will receive the command, check if its grid supports the browser and assign the requester (client) a session.

The client now needs to use this session to further instruct the grid. An example of a session-id would be `sofpa92f3fj023jfodsf9`.

When we've reached this point, the hub has instructed one of its node on the grid (which supports the browser we requested) to start the browser.

Since we want to test Google, we need to instruct the browser on the node to go to google.com. We do this by sending the "open" command to the grid, together with the URL and our sessionId. The hub will receive the request, check the sessionId and knows that we previously requested a Firefox browser on a specific node.

Our hub will forward the request to the node, which in its turn will instruct Firefox to open the page and go to the requested URL.

To end our test, we need to verify if the title of the page which is now opened on the node does in fact equal "Google". We send a request to the grid, asking our hub to contact the correct node and ask for the title of the current page.

We receive the title back from the grid and verify if the title does in fact equal the title we expect.

[← Previous post 5 Reasons why you should be using TestingBot](https://testingbot.com/blog/2011/12/06/5-reasons-why-you-should-be-using-testingbot) [Next post → We upgraded to Selenium v2.15.0](https://testingbot.com/blog/2011/12/09/we-upgraded-to-selenium-v2-15-0)

## 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)

[![blank](https://testingbot.com/assets/blank-765bda2d39d03b623c68515d78259503eb9ca884105d9fff58b2693418720ea1.gif)](https://testingbot.com/blog/2012/11/30/phantomjs-headless-testing-with-selenium-webdriver-and-testingbot "PhantomJS on TestingBot")

### [PhantomJS on TestingBot](https://testingbot.com/blog/2012/11/30/phantomjs-headless-testing-with-selenium-webdriver-and-testingbot)

Running tests with PhantomJS

[Read article →](https://testingbot.com/blog/2012/11/30/phantomjs-headless-testing-with-selenium-webdriver-and-testingbot)

## 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)
