This Edureka Selenium tutorial will give you an introduction to software testing. It talks about the drawbacks of manual testing and reasons why automation testing is the way forward. In this Selenium tutorial, you will also get to learn the different suites of Selenium and what are the features and shortcomings of Selenium as an automation testing tool.
To take a structured course on Selenium, you can check our Selenium training page: https://www.edureka.co/testing-with-selenium-webdriver
2. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
What Will You Learn Today?
Challenges with manual testing
How automation testing beats manual testing
Selenium as an automation testing tool
Advantages & disadvantages of Selenium
Selenium vs. other tools
Selenium suite of tools – ( IDE, RC, Grid, WebDriver )
Hands-on
Setting up Selenium environment
Testing dynamic Web applications using Selenium
4. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
WEB APPLICATION
Testing web apps manually involves:
• Loading all transactions
• Downloading those transactions
• Creating pass/ fail reports for each
• Validating the form
• Taking screenshots for each validation
Manual Testing
5. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Manual Testing & It’s Challenges
Tedious
Boring
Mistakes,
Errors…..
WEB APPLICATION
Testing web apps manually involves:
• Loading all transactions
• Downloading those transactions
• Creating pass/ fail reports for each
• Validating the form
• Taking screenshots for each validation
Boring
Time
consuming
9. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium As An Automation Testing Tool
Selenium is a suite of software tools to automate web browsers.
It is open source and mainly used for functional testing and regression testing.
Supports different PL Java, Python, C#, PHP, Ruby, Perl, JavaScript
Supports different OS Windows, Mac, Linux, iOS, Android
Supports different Browsers IE, Firefox, Chrome, Safari, Opera
11. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium vs. Other Tools
Features QTP IBM RFT Selenium
License Required Required Open Source
Cost High High Less because it is open-source
Customer Support
Dedicated HP
support
Dedicated IBM
support
Open Source Community
Hardware resource consumption
during script execution
High High Low
Coding experience Not Much Required
Should be very good along with
technical capabilities of integrating the
framework
Environment support Only for Windows Only for Windows
Windows, Linux, Solaris OS X (If browser
& JVM or JavaScript support exists)
Language Support VB Script Java and C#
Java, C#, Ruby, Python, Perl, PHP,
JavaScript
13. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium Suite Of Tools
• Selenium IDE is a Firefox plugin which is used to create and execute test cases
• It records and plays back the interactions which the user had with the web browser
• Using IDE, you can export the programming code in different languages: Java, Ruby, Python etc.
Record
button
Interactions
Recorded
List of
executable
test cases
IDE
RC
WebDriver
Grid
14. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium Suite Of Tools
IDE
RC
Create and edit test cases
Create and execute test suites
Debug and enhance test cases
Test cases can be exported to different PL
Enables learning of Selenium’s script syntax
Selenium IDE features
WebDriver
Grid
15. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium Suite Of Tools
Selenium IDE drawbacks
WebDriver
IDE
RC
Supports only Mozilla Firefox browser
Not suitable for dynamic web applications
No support for programming logic
Data driven testing not possible
No centralized maintenance of objects/ elements
WebDriver
Grid
16. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium Suite Of Tools
• Selenium Remote Control (RC) is used to write web
application tests in different PL
• It interacts with browsers with the help of Selenium
RC Server
• RC Server communicates using simple HTTP GET/
POST requests
• Drawback is that every communication with RC
server is timing consuming and hence RC is slow
• From Selenium v3 onwards, RC has been
depreciated and moved to legacy package
IDE
RC
WebDriver
Grid
17. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium WebDriver is a programming interface to create and execute test cases
Test cases are created and executed using Elements/ Object locators/ WebDriver
methods
Selenium WebDriver has programming interface; not IDE
Selenium IDE supports only IDE; doesn’t have programming interface
•Fast as it interacts with browser directly; RC needs RC server to interact with browser
Selenium Suite Of Tools
IDE
RC
WebDriver
Grid
18. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium Suite Of Tools
Each browser has its own driver on which the application runs.
Selenium WebDriver makes direct calls to the browser
HtmlUnit
Driver
IE Driver
Firefox
Driver
Chrome
Driver
Safari
Driver
Types Of
WebDrivers
IDE
RC
WebDriver
Grid
19. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium Suite Of Tools
• Support for:
PL JAVA, C#, PHP, Ruby, Perl, Python
Browsers Firefox, Chrome, IE, Safari
OS Windows, Mac, Linux, Android, iOS
• Overcomes limitations of Selenium 1 like file upload, download, pop-ups & dialogs barrier
Selenium WebDriver drawbacks
Selenium WebDriver features
• Detailed test reports cannot be generated
• No centralized maintenance of objects/ elements
IDE
RC
WebDriver
Grid
20. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium Suite Of Tools
• Selenium Grid is used to run multiple test scripts at the same time on multiple machines
• Parallel execution is achieved with the help of Hub-Node architecture
• Hub can control different test scripts on various browsers, OS and PL in various nodes
• Hub and nodes are started using jar files
• Supports RC test as well as WebDriver test
IDE
RC
Delegates
the request
Requests the
OS & browser
HUB
DEVELOPER
WebDriver
Grid
22. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Selenium WebDriver Commands
Get Command
Command: driver.get(URL);
Parameters: url – The URL to load
sendKeys Command
Command: sendKeys()
Parameters: onElement, charsequence
Click Command
Command: click()
Parameters: Element locators
Find Element Command
Command: driver.findelement()
Parameters: locator
Assert Method
Command: Assert.assertEquals()
Parameters: condition, message
23. www.edureka.co/testing-with-selenium-webdriverEDUREKA’S SELENIUM CERTIFICATION TRAINING
Course Details & Customer Reviews
Go to www.edureka.co/testing-with-selenium-webdriver
Get Edureka Certified in Selenium Today!
Radha Muthian says, “I learned Selenium WebDriver and the course
was very helpful to automate the Web Applications. The lifetime
access of classes helps a lot to refer back and download the codes.”
Vijay Krishnan says, “I have attended Selenium Web driver Certification with
Edureka. The trainer has explained all the concepts of the course in detail
manner which was very easy to understand. Worth for the money spent!!!!”
Tom Tully says, “I wanted to learn Selenium Webdriver in a live, real
course, not self paced, so there would be pressure on me to finish.
Edureka accomplished this at a price far lower than an in-person class,
and as far as I know they are the only internet class that has live lectures
on this subject. Teacher was very knowledgeable. I learned basic use of
Selenium. No problem with me being in US and teacher in India. They
have US 800 number.”
Suhas Kashyap says, “The online Course(Selenium Webdriver), which
I took from Edureka was interactive and also helped me to improve
my knowledge on selenium. Further helped me in changing the job as
well. Thanks Edureka Team... :).”
Manual testing is not reliable. Using this method test execution is not accurate all the time.To execute the test cases first time using manual testing will be very much useful. But it is not sure that it will catch the regression defects under frequently changing requirements.Manual testing will be useful when the test case only needs to run once or twice.To execute the test cases every time tester requires the same amount of time.Using manual testing,testing on different machine with different OS platform combination is not possible, concurrently. To execute such task different testers are required.It does not involve in programming task to fetch hidden information.Manual testing is slower than automation. Running tests manually can be very time consuming.It is very much helpful in UI testingTo execute the Build Verification Testing (BVT) is very mundane and tiresome in manual testing.Manual testing requires less cost than automation.
Manual testing is not reliable. Using this method test execution is not accurate all the time.To execute the test cases first time using manual testing will be very much useful. But it is not sure that it will catch the regression defects under frequently changing requirements.Manual testing will be useful when the test case only needs to run once or twice.To execute the test cases every time tester requires the same amount of time.Using manual testing,testing on different machine with different OS platform combination is not possible, concurrently. To execute such task different testers are required.It does not involve in programming task to fetch hidden information.Manual testing is slower than automation. Running tests manually can be very time consuming.It is very much helpful in UI testingTo execute the Build Verification Testing (BVT) is very mundane and tiresome in manual testing.Manual testing requires less cost than automation.
OOPs to support Keyword Driven, Data Driven and Hybrid Framework
RC Server receives the Selenium commands called Selenese from test programs using simple HTTP GET/ POST requests
Selenium RC is now outdated
Included as part of Selenium 2
Selenium WebDriver overcomes the limitations of Selenium 1, like file upload or download, pop-ups and dialogs barrier
Selenium WebDriver supports dynamic web pages where elements of a page may change without the page itself being reloaded
Parallel Execution
Platform Independent
Language Independent
Browser Independent
Fast Execution