Friday 6 May 2016

Guide to Selenium WebDriver

Guide to Selenium WebDriver

Selenium is an open source automated web-based software testing applications across different browsers and platforms. It is quite similar to HP Quick Test Pro (QTP) only that Selenium focuses on automating web-based application Testing.
Selenium was initially developed by Jason Huggins in 2004, an engineer at ThoughtWorks. The name Selenium comes from a joke made by Huggins in an email, mocking a competitor named Mercury, saying that you can cure mercury poisoning by taking selenium supplements. Jason suggested that name. His teammates took it.
Selenium core is the heart of the original Selenium implementation it’s a set of JavaScript scripts that control the browser, imitating user activity. This is sometimes referred to as "Selenium" and sometimes as "Core".
Selenium RC was the name given to the language bindings for Selenium Core, and is commonly and confusingly, referred to as just "Selenium" or "RC" Selenium RC receives Selenium Core commands via HTTP and executes them on a remote machine, proxying the web browser in order to avoid the “same host origin” restriction. This also allows writing the tests in other languages like C#, Python, Perl, PHP, Java and Ruby (via language bindings for Selenium Core).
Selenium WebDriver is a successor of Selenium RC. It does the same job, but in a different way: instead of injecting a JavaScript code into the browser to simulate user actions, it uses the browser’s native support for automation (different for each browser). Also, instead of a dictionary-based API (used in Selenium RC), it offers the more convenient object-oriented API.
In 2008, the whole Selenium Team decided to merge WebDriver and Selenium RC to form a more powerful tool called Selenium 2, with WebDriver being the core. Currently, Selenium RC is still being developed but only in maintenance mode. Most of the Selenium Project's efforts are now focused on Selenium 2.
Selenium IDE is a complete integrated development environment (IDE) for Selenium tests. It is a Firefox add-on that records user activity and creates a test case based on it. It can also play the tests back and save them as a program in different languages.

Selenium Grid is a server that allows tests to use web browser instances running on remote machines. Selenium-Grid allows you run the tests on different machines against different browsers in parallel; in other words it enables distributed test execution. The ability to run tests on remote browser instances is useful to spread the load of testing across several machines, and to run tests in browsers running on different platforms or operating systems. The latter is particularly useful in cases where not all browsers to be used for testing can run on the same platform.