This free selenium tutorial is designed to learn and understand selenium automation testing easily. Beginners can start from basic of selenium testing and advanced level users can learn advanced topics of selenium testing using this selenium tutorial. We will learn about selenium webdriver architecture, installation, test case creation, different commands, running webdriver test on different browsers, locating web element by different element locating strategies, handling and interacting with different web elements and framework creation.
What is selenium?
Selenium is widely used automation testing tool in software industry. It is framework which is designed to validate and automate web application on different web browsers and platforms. There are many testing tools available in market. But most of them are paid. Selenium webdriver is open source testing tool so you not need to pay for any license. You can download and use it in free of cost which makes is popular in software testing industry. Selenium project is developed by hundreds of volunteer contributors by spending their own thousands of hours which made it open source for everyone to use and improve.
Different components of selenium Suite
Selenium is not single tool. There are different four tools as below which are designed to perform different testing activity.
- Selenium IDE (Integrated Development Environment)
- Selenium RC (Remote Control)
- WebDriver
- Selenium Grid
Selenium IDE(Integrated Development Environment)
Selenium beginners can start from selenium IDE as one not need any coding language knowledge to automate and run tests in selenium IDE. It is browser extension supported in Firefox and chrome browsers. You can record your tests and play it again to execute test. You can debug your tests as well in selenium IDE.
Selenium RC
Selenium RC or selenium 1 was main project of selenium. Later on selenium 2 was released by merging selenium and webdriver and selenium RC deprecated.
There were two components selenium server and client libraries in selenium RC. Server used to launch and kill browsers, Executes selenese commands, Verifying http messages passing between the AUT and browser.
WebDriver
Selenium WebDriver is W3C recommended which drives browser natively as user would. Webdriver is Object Oriented API and being used by most of testers as it drives the browser very effectively. As of now, selenium 3 is latest version of webdriver. We will learn more about selenium webdriver in this selenium tutorial.
Selenium Grid
Selenium grid allows to run webdriver tests on multiple machines in parallel. You can run tests on different web browsers, browser versions and perform cross platform testing.
Selenium History
- 2004 : Initial development of selenium was started by Jason Huggins of ThoughtWorks. He developed JavaScript TestRunner to automate frontend user interactions.
- 2005 : Dan Fabulich and Nelson Sproul has developed Selenium RC or selenium 1 by working on selenium driver code.
- 2006 : Selenium IDE was developed by Shinya Kasatani by wrapping driver code in an IDE module.
- 2007 : Simon Stewart made it possible to run selenium tests in each popular browsers by separating driver clients for each browser. Which is known as selenium webdriver or selenium 2.
- 2008 : Server created by Philippe Hanrigou which allows to run selenium test on n number of remote devices.
- 2016 : Selenium 3 launched.
- 2021 : Selenium 4 released.
Languages support in selenium 3
In selenium, you can write test scripts in different languages as below.
- Java
- Python
- C#
- Ruby
- JavaScript (Node.JS)
- Kotlin
Selenium supported testing types
- Regression testing
- Integration testing
- System testing
- End to end testing
- Compatibility testing
- Performance testing
Selenium WebDriver supported OS Platforms
- Windows
- MAC
- Linux/Unix
Selenium WebDriver supported Browsers
- Google Chrome
- Mozilla Firefox
- Edge
- IE
- Safari
Locators supported by selenium webdriver
- ID
- Name
- className
- tagName
- linkText
- partiallinkText
- CSS Selector
- XPath
When to use selenium IDE and when to use selenium webdriver?
Easy to implement
Selenium is very easy to implement which makes it user friendly. If you are good programmer then you can develop your own extension as per your requirement and plug it with selenium.
Tools and frameworks support
You can use different tools/frameworks like maven, JUnit, TestNG, for easy test and project management and CI/CD tool like Jenkins for easy deployment process.
Is selenium easy to learn?
How can I learn selenium by myself?
- Learn HTML basics
- Learn any programming language like Java which is most popular with selenium.
- Learn element locators
- Install eclipse and configure selenium webdriver in eclipse.
- Learn basic test case creation with selenium.
- Install and Integrate JUnit or TestNG to use with selenium.
- Implement and automate lengthy scenarios with selenium.
- Learn and and implement frameworks like data driven, Keyword driven, Hybrid, POM etc.
- Install and integrate CI/CD tools like Jenkins.
No comments:
Post a Comment