Saturday 9 April 2016

Selenium Basic Concepts

What is Selenium ?
Selenium is an automation testing tool which will automate your web based applications. Selenium is an open source automation testing tool for web based applications. It is easy to use, strong and is very flexible. It can't use for Desktop based application automation.
You can work on many operating systems using selenium and you can code in any one of the following languages when using selenium.
Languages supported by Selenium
- Java   ---is most famous one
- C#
- Ruby
- Pyton
- PHP
- Pearl
It works on Mozilla, IE 6,7,8, Google Chrome(latest version), Opera 8,9,10, and Safari(latest version).
It also works on multiple operating systems-Windows, Mac, Linux/Unix, and many more operating systems.
It is not compulsory that our application code is in C# then you have to write selenium  code C#. 
It is independent of application to be test.
For example: if I make my website in java then I can write selenium code in PHP as well.
Components of Selenium
Selenium is made up of four components:
- Selenium IDE:  Installs as an addon in Mozilla.Only runs in Mozilla. Its got a strong feature of record and run. You can also extend IDE functionality with the help of user extensions. It supports regular extensions, loops, if statements and many other features. You can also parameterize your test cases using IDE.
For IDE, we dont need to learn any programming language. Only you need to know Javascript if you are using User extensions in IDE.
Drawback of IDE is that it works on only Firefox. sometimes it becomes difficult to use IDE.
Go to website- qtpselenium.com then select 'Selenium Training' and watch module no. 10
- Selenium RC:  This is the older version of selenium. It works on multiple browsers. RC can be implemented in any one of the programming languages mentioned above. RC has some limitations. To overcome those WebDriver came into the market.
- Webdriver:  Webdriver is the new version of selenium. It also works on multiple browsers. Its removed many drawbacks and issues in Selenium RC. It also supports Android and Iphone Testing. Architecture of WebDriver is totally different that the architecture of RC. But both RC and WebDriver require knowledge of one of the supported language.
 
- Grid:  Grid is used to run test cases in parallel on multiple machines and browsers. For example, you have 200 test cases and you want to run your test cases in parallel on four different machines(50 on each) or you want to run test cases in parallel(50 on Mozilla, 50 Safari, 50 on chrome, 50 IE) on single machine, you can do this easily using Grid.
Certain Features which make it a strong tool to use are:
- Open source
- Works on multiple browsers and multiple operating systems as compared to other tools in market.
- You can develop selenium code and make it run in parallel on multiple machines using different browsers.
- Support for Android and Iphone Testing.
- Selenium IDE is a simple tool which comes as an addon in firefox and is easy to use. It has the record and run feature which is very strong.
- You can also extend the functionality/scope of IDE with the help of many plugins available
- You can also create your own Selenium IDE plugins
- Selenium RC is the older version of selenium and is supporting all the languages mentioned above
- Webdriver is the latest version of selenium and is very strong. Its removed lots of drawbacks in RC and introduced many more features in selenium. - Selenium when used with Hudson can be used for Continuous integration.
- Object oriented datadriven or hybrid testing framework can be made very easily.
- You can use open source frameworks such as junit, testng, nunit etc and can write selenium test cases in them

Documentation for Selenium


Selenium video tutorial link-
qtpselenium.com

To read selenium language(Java, perl, etc.) specific link-
seleniumhq.org/docs

No comments: