Selenium is a testing environment and framework that, simply put, lets you automate browsers. This is great for creating test environments where your application and its resource utilization can be tested across real world user stories.
From their website,
“Selenium automates browsers”
It’s an automation testing tool that will automate your web-based application and it works on the following browsers i.e. Chrome, Internet Explorer, Firefox, Opera, and Safari. This makes selenium very powerful because it works on multiple browsers, browser versions and a wide array of Operating Systems. This makes it a very powerful tool and that’s why the demand for selenium is increasing since its inception.
One writes code for Selenium in
These are the six languages that Selenium supports now. It’s not necessary that if your application under scrutiny is made in PHP, then you would have to write your Selenium test cases in PHP, or in Java for a Java-based app. You can make your website in C# and can write your selenium code in PHP as well. So it is independent of the language in which the website is made. Selenium supports multiple browsers, and multiple operating systems, and multiple languages.
The Suite is made up of four components, or rather, it evolved in 4 stages –
IDE is something that comes as an add-on in Firefox, it only works on the Mozilla browser and comes as an add-on in the Mozilla Firefox. IDE is primarily a record and run tool. Since Recording and running functionality is present in every automation tool, it is present in IDE as well. The main drawback of IDE is that it works only on Mozilla Firefox.
Earlier there was something known as RC which used to work on multiple browsers and it is available in multiple languages as well. You can write the test code in Java, C#, Ruby, Python Perl or PHP for learning IDE. You don’t need to learn any programming language, but if you are working with RC you must know any one of the programming languages. RC had its own limitations as well. With RC there used to be a separate server which was difficult to handle.
So to overcome those limitations Webdriver came into existence. Webdriver supports multiple browsers. It is an enhanced version of RC, but the architecture of webdriver is completely different from the architecture of RC. IDE only works only on Mozilla but RC and webdriver works on all the browsers and both of them require the knowledge of any one of the programming languages from above.
The grid is something that will help you run your test cases parallelly. For example, let’s say you’ve got 200 test cases, and you want to run the test cases parallelly on three machines. One machine can handle test case execution on Safari, the other will run it on Mozilla, and the next one on the Chrome. Say you want to distribute your test cases on four different machines that are on the first machine. The first 50 test cases should run on the next machine. Next 50 on the third, Next 50, and on the fourth etc. You want to divide your test cases into two parts and run them parallely. This way, execution takes lesser time.