Questions tagged [selenium]

Selenium is a popular open-source tool for automating web browsers. When using this tag, also include other tags for the specific components you are using, e.g. selenium-webdriver for the language bindings, selenium-ide, selenium-grid, etc.

Selenium is a portable software testing framework for web browser automation. The Selenium IDE provides a record/playback tool for authoring tests without learning a test scripting language. Selenium provides a test domain-specific language (DSL) to write tests in a number of popular programming languages, including Java, C#, Ruby, Groovy, Python, PHP, and Perl. Test playback is possible in most modern web browsers. Selenium deploys on Windows, Linux, and Macintosh platforms.

When using this tag, also include other tags for the specific components you are using, e.g. selenium-webdriver for the language bindings, selenium-ide, selenium-grid, etc.

Selenium 3

Selenium 3 is the third installment of the Selenium software. The major change for Selenium 3, is that all RC users will find that Selenium 3 will not work by dropping in. The same however is not true for WebDriver users. WebDriver users will find that Selenium 3 is just a drop-in replacement. All RC code has been removed from the source base. These are some of the other improvements/changes:

  • WebDriver users will just find bug fixes and a drop-in replacement for 2.x.
  • Selenium Grid users will also find bug fixes and a simple update.
  • The WebDriver APIs are now the only APIs actively supported by the Selenium project.
  • The Selenium RC APIs have been moved to a “legacy” package.
  • The original code powering Selenium RC has been replaced with something backed by WebDriver, which is also contained in the “legacy” package.
  • By a quirk of timing, Mozilla has made changes to Firefox that mean that from Firefox 48 you must use their geckodriver to use that browser, regardless of whether you’re using Selenium 2 or 3.

Selenium 2

Selenium 2 WebDriver, the successor to Selenium 1, is the second installment of Selenium, and ties directly into the browser API that is provided by the browser manufacturer.

Selenium 1

Selenium 1, also known as Selenium RC (Remote Control), is the first version of Selenium that provided JavaScript libraries that would be injected into the browser.

Selenium was originally developed by Jason Huggins, who was later joined by other programmers and testers at ThoughtWorks. It is open-source software, released under the Apache 2.0 license, and can be downloaded and used personally or commercially without charge.

Selenium IDE

Selenium IDE is a complete integrated development environment (IDE) for Selenium tests. It is implemented as a extension and allows recording, editing, and debugging tests. It was previously known as Selenium Recorder. Selenium IDE was originally created by Shinya Kasatani and donated to the Selenium project in 2006.

Selenium Builder

Selenium Builder is a record and playback IDE for Selenium tests. It is implemented as a plugin and allows recording, editing, and debugging tests. It was initially created by SauceLabs and the source code base was given to the Selenium project with the plan to eventually replace 'Selenium IDE'.

Selenium Grid

  • Selenium Grid Extras - A framework that provides additional features beyond the basic Selenium Grid like video recording.
  • SeLion - A (Java) framework for running Selenium tests with additional features beyond the basic Selenium Grid functionality, particularly like stability improvements, etc.
  • Selenium Grid Extensions - A set of extensions for Selenium Grid that provide additional features like running Sikuli tests/automation remotely, upload/download files on a grid node.

References

Related tags

86972 questions
545
votes
15 answers

Get HTML source of WebElement in Selenium WebDriver using Python

I'm using the Python bindings to run Selenium WebDriver: from selenium import webdriver wd = webdriver.Firefox() I know I can grab a webelement like so: elem = wd.find_element_by_css_selector('#my-id') And I know I can get the full page source…
Chris W.
  • 32,518
  • 30
  • 89
  • 121
516
votes
33 answers

Selenium using Python - Geckodriver executable needs to be in PATH

I'm new to programming and started with Python about two months ago and am going over Sweigart's Automate the Boring Stuff with Python text. I'm using IDLE and already installed the Selenium module and the Firefox browser. Whenever I tried to run…
tadm123
  • 6,523
  • 4
  • 20
  • 35
515
votes
45 answers

How can I take a screenshot with Selenium WebDriver?

Is it possible to take a screenshot using Selenium WebDriver? (Note: Not Selenium Remote Control)
447
votes
20 answers

Can a website detect when you are using Selenium with chromedriver?

I've been testing out Selenium with Chromedriver and I noticed that some pages can detect that you're using Selenium even though there's no automation at all. Even when I'm just browsing manually just using Chrome through Selenium and Xephyr I often…
425
votes
50 answers

Debugging "Element is not clickable at point" error

I see this only in Chrome. The full error message reads: "org.openqa.selenium.WebDriverException: Element is not clickable at point (411, 675). Other element would receive the click: ..." The element that 'would receive the click' is to the side…
user1591169
  • 4,251
  • 3
  • 11
  • 3
368
votes
3 answers

Headless Browser and scraping - solutions

I'm trying to put list of possible solutions for browser automatic tests suits and headless browser platforms capable of scraping. BROWSER TESTING / SCRAPING: Selenium - polyglot flagship in browser automation, bindings for Python, Ruby, …
Inoperable
  • 1,339
  • 5
  • 15
  • 30
314
votes
10 answers

Is there a way to get element by XPath using JavaScript in Selenium WebDriver?

I am looking for something like: getElementByXpath(//html[1]/body[1]/div[1]).innerHTML I need to get the innerHTML of elements using JS (to use that in Selenium WebDriver/Java, since WebDriver can't find it itself), but how? I could use ID…
pMan
  • 7,118
  • 10
  • 29
  • 34
305
votes
11 answers

How do I find an element that contains specific text in Selenium WebDriver (Python)?

I'm trying to test a complicated JavaScript interface with Selenium (using the Python interface, and across multiple browsers). I have a number of buttons of the form:
My Button
I'd like to be able to search for buttons based on "My…
josh
  • 7,480
  • 7
  • 28
  • 33
288
votes
30 answers

Typing the Enter/Return key using Python and Selenium

I'm looking for a quick way to type the Enter or Return key in Selenium. Unfortunately, the form I'm trying to test (not my own code, so I can't modify) doesn't have a Submit button. When working with it manually, I just type Enter or Return. How…
croixhaug
  • 3,267
  • 3
  • 17
  • 12
267
votes
48 answers

Wait for page load in Selenium

How do you make Selenium 2.0 wait for the page to load?
karthick kumar
  • 2,681
  • 2
  • 13
  • 4
253
votes
4 answers

What would be an alternate to [TearDown] and [SetUp] in MSTest?

When I use MSTest Framework, and copy the code that Selenium IDE generated for me, MSTest doesn't recognize [TearDown] and [SetUp]. What is the alternative to this?
Maya
  • 6,525
  • 11
  • 39
  • 51
242
votes
14 answers

How to select a drop-down menu value with Selenium using Python?

I need to select an element from a drop-down menu. For example: