2

I've heard about Selenium in several different contexts

http://docs.seleniumhq.org/ says Selenium automates browsers.

But exactly what role does 'Selenium' play in that?

closed as unclear what you're asking by IAmMilinPatel, Yu Zhang, NarendraC, Paul Muir, Bharat Mane Nov 10 '16 at 12:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

2

As Michael Durrant pointed out, Selenium is a set of technologies.

The most used is the Selenium Webdriver - which is in the process to become a W3C standard. The Webdriver is a browser driver - a tool which can perform actions ('click in an element', 'input text in a field') and inspect the DOM ('retrieve the text from a element').

Selenium is completely agnostic (i.e., does not perform) on the following tasks:

  • Assertions
  • Test specification (The usage flow of action);
  • System modeling (Page-Object Pattern, i.e.)

The first point is usually responsibility of a XUnit framework (JUnit, PyUnit). The other two points are performed by the automation framework the you are building.

For tests specifications, Cucumber is a tool that can fit in most projects - the work needed here are in hooks for test precondition setting and teardown. System modeling depends highly on your context - for web apps, tools like Site Prism and page-object can help, but this is where most software engineering work is implemented.

A bad smell in a automation project is when code for this 4 tasks (browser manipulation, assertions, test specification and system modeling) are intertwined.

1

Selenium is a set of technologies and implementations that allow you to automate browser interactions.

A key part is that the major manufacturers have provided an api that allow for automated interaction with the DOM of their browsers.

These interactions are then made available to tools and languages that can use them to build test cases in the language and testing framework of choice.

The most simple one is the Selenium IDE which is a firefox (only) plugin that allows you to write simple local automation running on your machine and using Firefox.

Beyond this the selenium API is provided to programming languages such as Python, C#, Java and Ruby through modules that are formatted appropriately for those languages, for example with Ruby this is the capybara gem which is combined with a test framework such as rspec or Test::Unit

0

Selenium is an open-sourced API which lays atop the WebDriver.

Selenium is a set of semi-standardized commands for the different WebDrivers, branching over multiple languages, which allows a user to easily send and receive commands and information from the WebDriver.

Not the answer you're looking for? Browse other questions tagged or ask your own question.