SlideShare a Scribd company logo
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Selenium | Simplilearn
What is Selenium?
What’s in it for you?
What is Selenium?
Why Selenium WebDriver?
What’s in it for you?
What is Selenium?
Why Selenium WebDriver?
What is Selenium
WebDriver?
What’s in it for you?
What is Selenium?
Why Selenium WebDriver?
What is Selenium
WebDriver?
Architecture of Selenium
WebDriver
What’s in it for you?
What’s in it for you?
What is Selenium?
Why Selenium WebDriver?
What is Selenium
WebDriver?
Architecture of Selenium
WebDriver
Limitations of Selenium
WebDriver
What’s in it for you?
What is Selenium?
Why Selenium WebDriver?
What is Selenium
WebDriver?
Architecture of Selenium
WebDriver
Demo: Automation testing
with WebDriver
Limitations of Selenium
WebDriver
What is Selenium?
Advent of Selenium
Why can’t I test for the
performance
No good scope eitherSo many errors!
Time consuming
Conventional manual testing has several
drawbacks and is extremely monotonous
Drawbacks of Manual Testing
Time consuming
Drawbacks of Manual Testing
Error-prone
Time consuming
Drawbacks of Manual Testing
Limited scope for testingError prone
Time consuming
Drawbacks of Manual Testing
Time consuming
Why can’t I test for
the performance??
Limited scope for testingError prone
Advent of Selenium
Why can’t I test for the
performance
No good scope eitherSo many errors!
Time consuming
Selenium originated in 2004 -
as a tool for testing web
applications
Advent of Selenium
Why can’t I test for the
performance
No good scope eitherSo many errors!
Time consuming
Selenium originated in 2004 -
as a tool for testing web
applications
It was developed by Jason
Huggins, a programmer at
ThoughtWorks
Advent of Selenium
Why can’t I test for the
performance
No good scope eitherSo many errors!
Time consuming
Selenium originated in 2004 -
as a tool for testing web
applications
It was developed by Jason
Huggins, a programmer at
ThoughtWorks
It competed against other automation
testing tools like QTP (Quick test
Professional) developed by HP and
RFT(Rational functional tester)
developed by IBM
Advent of Selenium
Why can’t I test for the
performance
No good scope eitherSo many errors!
Time consuming
Selenium originated in 2004 -
as a tool for testing web
applications
It was developed by Jason
Huggins, a programmer at
ThoughtWorks
It competed against other automation
testing tools like QTP (Quick test
Professional) developed by HP and
RFT(Rational functional tester)
developed by IBM
Selenium was developed as
JavaScriptTestRunner
and evolved over years as a powerful
automated testing tool
Widely used automation testing tool
What is Selenium?
Widely used automation testing tool
Tests web applications across various browsers
What is Selenium?
Widely used automation testing tool
Tests web applications across various browsers
Consists of a set of software tools that facilitate testing
What is Selenium?
Widely used automation testing tool
Tests web applications across various browsers
Consists of a set of software tools that facilitate testing
Platform independent and open source
What is Selenium?
Selenium is primarily developed in Java Script
What is Selenium?
Selenium is primarily developed in Java Script
It provides a record/playback tool for authoring tests without learning a test scripting
language
What is Selenium?
Selenium is primarily developed in Java Script
It provides a record/playback tool for authoring tests without learning a test scripting
language
The tests can also be coded in a number of popular programming languages
What is Selenium?
Selenium is primarily developed in Java Script
It provides a record/playback tool for authoring tests without learning a test scripting
language
Selenium can be deployed on Windows, Linux, and Macintosh
What is Selenium?
The tests can also be coded in a number of popular programming languages
Selenium suite
Selenium IDE
Selenium test
suite
Browser plugin that records
user actions and exports them
as a reusable script
Selenium
suite
Selenium suite
Selenium IDE Selenium RC
Selenium test
suite
• Multi-programming and multi
browser support
• Deprecated in Selenium 2
Browser plugin that records
user actions and exports them
as a reusable script
Selenium
suite
Selenium suite
Selenium IDE Selenium RC
Selenium
WebDriver
Selenium test
suite
Browser plugin that records
user actions and exports them
as a reusable script
• Uses APIs to interact with the
browser
• Successor of Selenium RC
• Multi-programming and multi
browser support
• Deprecated in Selenium 2
Selenium
suite
Selenium suite
Selenium IDE Selenium RC
Selenium
WebDriver
Selenium
Grid
Selenium test
suite
Browser plugin that records
user actions and exports them
as a reusable script
• Runs multiple tests against
different browsers.
• Capable of running tests in
parallel
• Uses APIs to interact with the
browser
• Successor of Selenium RC
• Multi-programming and multi
browser support
• Deprecated in Selenium 2
Selenium
suite
Selenium suite
Selenium 1
Selenium 2
Selenium 3
Selenium 4
Selenium IDE Selenium RC Grid
Selenium IDE *Selenium RC Grid
Selenium IDE
Selenium
WebDriver
Grid
Selenium
WebDriver
Version 4 is just around the corner. However, Alpha has been released!
Why Selenium WebDriver?
Let’s first discuss Selenium RC
and its shortcomings
Working principle of Selenium RC
Selenium Remote Control (RC) is a test tool that allows you to write
automated web application UI tests in any programming language
against any HTTP website using any mainstream JavaScript-enabled
browser.
Selenium test script RC server Web browser Web server
Test script written in any programming language like
JAVA, PHP, Python etc.
Working principle of Selenium RC
Selenium test script RC server Web browser Web server
Selenium Server receives Selenium commands from
your test program, interprets them, and reports the
results back to the program
Working principle of Selenium RC
Selenium test script RC server Web browser Web server
The Web browser is injected with Selenium core which
interprets and executes the Selenese commands used in
the test script
Working principle of Selenium RC
Selenium test script RC server Web browser Web server
The Web browser can now interact with the web server
accordingly
Working principle of Selenium RC
Selenium test script RC Server Web browser Web server
RC consists of an additional server that
acts as a middle man
This additional setup complicates the
architecture
The time taken for execution of
commands is longer
Shortcomings of Selenium RC
How does Selenium WebDriver
overcome this?
Selenium test script
Selenium WebDriver
Web browser Web server
Selenium test script
Selenium WebDriver
Web serverWeb browser
Selenium-WebDriver does not use an
additional server
It makes direct calls to the browser using
each browser’s native support for
automation
The execution time for commands is
shorter due to the simple architecture
A single function has
several commands
Selenium RC
APIs in Selenium RC
A single function has
several commands
Selenium RC
APIs in Selenium RC
Redundant &
confusing APIs
A single function has
several commands
Selenium RC
APIs in Selenium RC
Redundant &
confusing APIs
A single function has
several commands
Selenium RC
APIs in Selenium RC
Redundant &
confusing APIs
Different browsers
interpret different
commands differently
A single function has
several commands
Selenium RC
APIs in Selenium RC
Redundant &
confusing APIs
Different browsers
interpret different
commands differently
Selenium WebDriver
A single function has
several commands
Selenium RC
APIs in Selenium RC
Redundant &
confusing APIs
Different browsers
interpret different
commands differently
Selenium WebDriver
Simple and easy to
remember
A single function has
several commands
Selenium RC
APIs in Selenium RC
Redundant &
confusing APIs
Different browsers
interpret different
commands differently
Selenium WebDriver
No Redundant
commands
Simple and easy to
remember
A single function has
several commands
Selenium RC
APIs in Selenium RC
Redundant &
confusing APIs
No Redundant
commands
Simple and easy to
remember
Different browsers
interpret different
commands differently
Selenium WebDriver
Browser support in Selenium RC
Requires a real browser to
operate on
Does not support HtmlUnit
browser
No time spent in loading web
elements
Supports a headless, GUI-less
HtmlUnit browser
Selenium WebDriverSelenium RC
Browser support in Selenium WebDriver
Requires a real browser to
operate on
Does not support HtmlUnit
browser
No time spent in loading web
elements
Supports a headless, GUI-less
HtmlUnit browser
Selenium RC Selenium WebDriver
Simple architecture
Faster execution
Interacts directly with
the browser
Easy to use APIs
Support for HtmlUnit
browser
Complex architecture
Slower execution
Requires an RC
server to interact with
the browser
Confusing APIs
No support for
HtmlUnit browser
To summarize…
Selenium
WebDriverSelenium RC
What is Selenium WebDriver?
What is Selenium WebDriver?
Selenium WebDriver is a tool that
runs automated tests across
different browsers
What is Selenium WebDriver?
What is Selenium WebDriver?
Founded by Simon Stewart in 2006
What is Selenium WebDriver?
Founded by Simon Stewart in 2006
It is a cross platform testing framework
Founded by Simon Stewart in 2006
It is a cross platform testing framework
Programming interface to create and run test cases
What is Selenium WebDriver?
What is Selenium WebDriver?
Founded by Simon Stewart in 2006
It is a cross platform testing framework
Programming interface to create and run test cases
Makes provision to perform action on web elements
What is Selenium WebDriver?
Founded by Simon Stewart in 2006
It is a cross platform testing framework
Programming interface to create and run test cases
Makes provision to perform action on web elements
Does not require a core engine like RC and interacts natively with the
browser applications
What is Selenium WebDriver?
Founded by Simon Stewart in 2006
It is a cross platform testing framework
Programming interface to create and run test cases
Makes provision to perform action on web elements
Does not require a core engine like RC and interacts natively with the
browser applications
Supports Java, C#, PHP, Python, Perl, Ruby etc.
What is Selenium WebDriver?
Founded by Simon Stewart in 2006
It is a cross platform testing framework
Programming interface to create and run test cases
Makes provision to perform action on web elements
Does not require a core engine like RC and interacts natively with the
browser applications
Supports Java, C#, PHP, Python, Perl, Ruby etc.
Supports frameworks like TestNG, JUnit, NUnit
rchitecture of Selenium WebDriver
JSON Wire Protocol
Browsers
• Chrome browser
• Firefox browser
• Opera browser
• Safari browser
• Edge browser
Http over Http Server
Browser Drivers
• ChromeDriver
• FirefoxDriver
• OperaDriver
• SafariDriver
• EdgeDriver
Http over Http Server
Architecture of Selenium WebDriver
Selenium test script
(Java, PHP, Perl…)
Selenium test script is the test code written in any of
the mentioned programming languages that is
interpreted by the driver
Browsers
• Chrome browser
• Firefox browser
• Opera browser
• Safari browser
• Edge browser
Browser Drivers
• ChromeDriver
• FirefoxDriver
• OperaDriver
• SafariDriver
• EdgeDriver
Http over Http Server
Http over Http Server
Architecture of Selenium WebDriver
Selenium test script
(Java, PHP, Perl…)
JSON Wire Protocol
JSON Wire Protocol provides a transport mechanism
to transfer data between a server and a client. JSON
Wire Protocol serves as an industry standard for
various web services
Browsers
• Chrome browser
• Firefox browser
• Opera browser
• Safari browser
• Edge browser
Http over Http Server
Http over Http Server
Architecture of Selenium WebDriver
Selenium test script
(Java, PHP, Perl…)
JSON Wire Protocol
Browser Drivers
• ChromeDriver
• FirefoxDriver
• OperaDriver
• SafariDriver
• EdgeDriver
Selenium uses drivers, specific to each browser in
order to establish a secure connection with the
browser
Architecture of Selenium WebDriver
Selenium test script
(Java, PHP, Perl…)
JSON Wire Protocol
Browser Drivers
• ChromeDriver
• FirefoxDriver
• OperaDriver
• SafariDriver
• EdgeDriver
Browsers
• Chrome browser
• Firefox browser
• Opera browser
• Safari browser
• Edge browser
Http over Http Server
Http over Http Server
Selenium WebDriver supports various web browsers
to test and run applications on
imitations of Selenium WebDriver
Cannot handle
pop-ups and
advertisement
windows
Limitations of WebDriver
Cannot test mobile
applications. Requires
frameworks like Appium
Cannot handle
pop-ups and
advertisement
windows
Limitations of WebDriver
Cannot test mobile
applications. Requires
frameworks like Appium
Can only perform
sequential testing
hence requires Grid
for parallel testing
Cannot handle
pop-ups and
advertisement
windows
Limitations of WebDriver
Cannot test mobile
applications. Requires
frameworks like Appium
Can only perform
sequential testing
hence requires Grid
for parallel testing
Limited reporting.
Third party tools like
TestNG are required
CrossBrowserTesting
Cannot handle
pop-ups and
advertisement
windows
Limitations of WebDriver
Cannot test mobile
applications. Requires
frameworks like Appium
Can only perform
sequential testing
hence requires Grid
for parallel testing
Limited reporting.
Third party tools like
TestNG are required
CrossBrowserTesting
Limited image testing
Demo: Automation testing using
WebDriver
Browser APIs and their usage
Get Commands
driver.get(“https://www.google.co.in”);
driver.getTitle();
driver.getCurrentUrl();
driver.getPageSource();
driver.getWindowHandle();
driver.getWindowHandles();
Navigation Commands
driver.navigate().to("https://www.ebay.in/");
driver.navigate().back();
driver.navigate().forward();
driver.navigate().refresh();
Locator Commands
driver.findElement(By.id(“user”));
driver.findElement(By.linkText(“click here”));
driver.findElement(By.name(“admin”));
driver.findElement(By.className(“main-container”));
driver.findElement(By.cssSelector(“#primary”));
driver.findElement(By.xpath(“//*[@id="primary"]”));
Browser Commands
driver.close()
Closes the current browser window
driver.quit()
Quits the entire browser session
Demo Use case
Usecase 1 : As a user, I want to login to ebay.in and search for “JBL Speakers”
Then I want to check the day’s deals
Usecase 2 : From ebay.in, navigate to Simplilearn website. And navigate back to ebay.in
Usecase 3: From ebay.in, I want to print the page title and close the browser
Key takeaways
Key Takeaways
• What is Selenium
• Limitations of Selenium RC and how WebDriver overcomes it
• What is Selenium WebDriver?
• Architecture of Selenium WebDriver
• Limitations of Selenium WebDriver
• Browser APIs and their usage
Ad

Recommended

What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
What Is Selenium? | Selenium Basics For Beginners | Introduction To Selenium ...
Simplilearn
 
An overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
QSpiders - Automation using Selenium
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 
Introduction to Selenium Web Driver
Introduction to Selenium Web Driver
Return on Intelligence
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
Pankaj Biswas
 
Selenium test automation
Selenium test automation
Srikanth Vuriti
 
Test automation using selenium
Test automation using selenium
Cynoteck Technology Solutions Private Limited
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Automation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
 
Test Automation and Selenium
Test Automation and Selenium
Karapet Sarkisyan
 
Selenium Concepts
Selenium Concepts
Swati Bansal
 
Web automation using selenium.ppt
Web automation using selenium.ppt
Ana Sarbescu
 
Selenium ppt
Selenium ppt
Naga Dinesh
 
Selenium introduction
Selenium introduction
Pankaj Dubey
 
Selenium WebDriver training
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
Webinar: Selenium WebDriver - Automation Uncomplicated
Webinar: Selenium WebDriver - Automation Uncomplicated
Edureka!
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
Edureka!
 
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
Edureka!
 
Automated Web Testing Using Selenium
Automated Web Testing Using Selenium
Weifeng Zhang
 
Selenium ppt
Selenium ppt
Aneesh Rangarajan
 
Cypress Automation
Cypress Automation
Susantha Pathirana
 
Selenium Grid
Selenium Grid
nirvdrum
 
Introduction to Selenium grid
Introduction to Selenium grid
Knoldus Inc.
 
Selenium WebDriver
Selenium WebDriver
Rajathi-QA
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Edureka!
 
Selenium introduction
Selenium introduction
Deepak Kumar Digar
 
Test Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Selenium
Selenium
Jahan Murugassan
 

More Related Content

What's hot (20)

Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Automation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
 
Test Automation and Selenium
Test Automation and Selenium
Karapet Sarkisyan
 
Selenium Concepts
Selenium Concepts
Swati Bansal
 
Web automation using selenium.ppt
Web automation using selenium.ppt
Ana Sarbescu
 
Selenium ppt
Selenium ppt
Naga Dinesh
 
Selenium introduction
Selenium introduction
Pankaj Dubey
 
Selenium WebDriver training
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
Webinar: Selenium WebDriver - Automation Uncomplicated
Webinar: Selenium WebDriver - Automation Uncomplicated
Edureka!
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
Edureka!
 
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
Edureka!
 
Automated Web Testing Using Selenium
Automated Web Testing Using Selenium
Weifeng Zhang
 
Selenium ppt
Selenium ppt
Aneesh Rangarajan
 
Cypress Automation
Cypress Automation
Susantha Pathirana
 
Selenium Grid
Selenium Grid
nirvdrum
 
Introduction to Selenium grid
Introduction to Selenium grid
Knoldus Inc.
 
Selenium WebDriver
Selenium WebDriver
Rajathi-QA
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Edureka!
 
Selenium introduction
Selenium introduction
Deepak Kumar Digar
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Automation - web testing with selenium
Automation - web testing with selenium
Tzirla Rozental
 
Test Automation and Selenium
Test Automation and Selenium
Karapet Sarkisyan
 
Web automation using selenium.ppt
Web automation using selenium.ppt
Ana Sarbescu
 
Selenium introduction
Selenium introduction
Pankaj Dubey
 
Webinar: Selenium WebDriver - Automation Uncomplicated
Webinar: Selenium WebDriver - Automation Uncomplicated
Edureka!
 
Data driven Automation Framework with Selenium
Data driven Automation Framework with Selenium
Edureka!
 
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
Edureka!
 
Automated Web Testing Using Selenium
Automated Web Testing Using Selenium
Weifeng Zhang
 
Selenium Grid
Selenium Grid
nirvdrum
 
Introduction to Selenium grid
Introduction to Selenium grid
Knoldus Inc.
 
Selenium WebDriver
Selenium WebDriver
Rajathi-QA
 
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Edureka!
 

Similar to Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Selenium | Simplilearn (20)

Test Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Selenium
Selenium
Jahan Murugassan
 
Introduction to selenium
Introduction to selenium
Archana Krushnan
 
Python selenium
Python selenium
Ducat
 
test-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptx
SyedZaeem9
 
Demystifying Selenium framework
Demystifying Selenium framework
kunalgate125
 
Automation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
Syntax Technologies
 
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
SunilNagaraj10
 
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
sumanthveeramallu9
 
Basics of selenium containing features of selenium
Basics of selenium containing features of selenium
Madhuri Lonikar
 
Introduction to Selenium Automation
Introduction to Selenium Automation
Mindfire Solutions
 
Selenium Automation Testing - A Complete Guide
Selenium Automation Testing - A Complete Guide
Abhay Kumar
 
Selenium
Selenium
Daksh Sharma
 
Reasons behind selenium automation testing popularity
Reasons behind selenium automation testing popularity
Ray Business Technologies
 
Selenium
Selenium
Satyam Pandey
 
Selenium
Selenium
jagdishdevabhaipatel
 
Selenium - Introduction
Selenium - Introduction
Amr E. Mohamed
 
Selenium presentation
Selenium presentation
shivani thakur
 
Selenium Primer
Selenium Primer
gueste1e4db
 
Test Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
Python selenium
Python selenium
Ducat
 
test-automation-selenium-160216124839.pptx
test-automation-selenium-160216124839.pptx
SyedZaeem9
 
Demystifying Selenium framework
Demystifying Selenium framework
kunalgate125
 
Automation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
Syntax Technologies
 
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
SunilNagaraj10
 
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
Selenium.pptxgsjdxhasdjhckcjjkdcbdcbvdciosdc
sumanthveeramallu9
 
Basics of selenium containing features of selenium
Basics of selenium containing features of selenium
Madhuri Lonikar
 
Introduction to Selenium Automation
Introduction to Selenium Automation
Mindfire Solutions
 
Selenium Automation Testing - A Complete Guide
Selenium Automation Testing - A Complete Guide
Abhay Kumar
 
Reasons behind selenium automation testing popularity
Reasons behind selenium automation testing popularity
Ray Business Technologies
 
Selenium - Introduction
Selenium - Introduction
Amr E. Mohamed
 
Ad

More from Simplilearn (20)

Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Simplilearn
 
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Simplilearn
 
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Simplilearn
 
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
Simplilearn
 
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
Simplilearn
 
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
Simplilearn
 
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Simplilearn
 
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
Simplilearn
 
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Simplilearn
 
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Simplilearn
 
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Simplilearn
 
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
Simplilearn
 
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Simplilearn
 
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Simplilearn
 
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Top 50 Scrum Master Interview Questions | Scrum Master Interview Questions & ...
Simplilearn
 
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Bagging Vs Boosting In Machine Learning | Ensemble Learning In Machine Learni...
Simplilearn
 
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Future Of Social Media | Social Media Trends and Strategies 2025 | Instagram ...
Simplilearn
 
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
SQL Query Optimization | SQL Query Optimization Techniques | SQL Basics | SQL...
Simplilearn
 
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
SQL INterview Questions .pTop 45 SQL Interview Questions And Answers In 2025 ...
Simplilearn
 
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
How To Start Influencer Marketing Business | Influencer Marketing For Beginne...
Simplilearn
 
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Cyber Security Roadmap 2025 | How To Become Cyber Security Engineer In 2025 |...
Simplilearn
 
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
How To Become An AI And ML Engineer In 2025 | AI Engineer Roadmap | AI ML Car...
Simplilearn
 
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
What Is GitHub Copilot? | How To Use GitHub Copilot? | How does GitHub Copilo...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Top 7 High Paying AI Certifications Courses For 2025 | Best AI Certifications...
Simplilearn
 
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Data Cleaning In Data Mining | Step by Step Data Cleaning Process | Data Clea...
Simplilearn
 
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Top 10 Data Analyst Projects For 2025 | Data Analyst Projects | Data Analysis...
Simplilearn
 
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
AI Engineer Roadmap 2025 | AI Engineer Roadmap For Beginners | AI Engineer Ca...
Simplilearn
 
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Machine Learning Roadmap 2025 | Machine Learning Engineer Roadmap For Beginne...
Simplilearn
 
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Kotter's 8-Step Change Model Explained | Kotter's Change Management Model | S...
Simplilearn
 
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Gen AI Engineer Roadmap For 2025 | How To Become Gen AI Engineer In 2025 | Si...
Simplilearn
 
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Top 10 Data Analyst Certification For 2025 | Best Data Analyst Certification ...
Simplilearn
 
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Complete Data Science Roadmap For 2025 | Data Scientist Roadmap For Beginners...
Simplilearn
 
Ad

Recently uploaded (20)

Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
RAKESH SAJJAN
 
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Pragya - UEM Kolkata Quiz Club
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
RAKESH SAJJAN
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Community Health Nursing Approaches, Concepts, Roles & Responsibilities – Uni...
Community Health Nursing Approaches, Concepts, Roles & Responsibilities – Uni...
RAKESH SAJJAN
 
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
RAKESH SAJJAN
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
Assisting Individuals and Families to Promote and Maintain Health – Unit 7 | ...
RAKESH SAJJAN
 
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Battle of Bookworms 2025 - U25 Literature Quiz by Pragya
Pragya - UEM Kolkata Quiz Club
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
This is why students from these 44 institutions have not received National Se...
This is why students from these 44 institutions have not received National Se...
Kweku Zurek
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
ENGLISH-5 Q1 Lesson 1.pptx - Story Elements
Mayvel Nadal
 
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
Communicable Diseases and National Health Programs – Unit 9 | B.Sc Nursing 5t...
RAKESH SAJJAN
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT KGP Quiz Week 2024 Sports Quiz (Prelims + Finals)
IIT Kharagpur Quiz Club
 
Community Health Nursing Approaches, Concepts, Roles & Responsibilities – Uni...
Community Health Nursing Approaches, Concepts, Roles & Responsibilities – Uni...
RAKESH SAJJAN
 
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
RAKESH SAJJAN
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
Birnagar High School Platinum Jubilee Quiz.pptx
Birnagar High School Platinum Jubilee Quiz.pptx
Sourav Kr Podder
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 

Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Selenium | Simplilearn

  • 2. What is Selenium? What’s in it for you?
  • 3. What is Selenium? Why Selenium WebDriver? What’s in it for you?
  • 4. What is Selenium? Why Selenium WebDriver? What is Selenium WebDriver? What’s in it for you?
  • 5. What is Selenium? Why Selenium WebDriver? What is Selenium WebDriver? Architecture of Selenium WebDriver What’s in it for you?
  • 6. What’s in it for you? What is Selenium? Why Selenium WebDriver? What is Selenium WebDriver? Architecture of Selenium WebDriver Limitations of Selenium WebDriver
  • 7. What’s in it for you? What is Selenium? Why Selenium WebDriver? What is Selenium WebDriver? Architecture of Selenium WebDriver Demo: Automation testing with WebDriver Limitations of Selenium WebDriver
  • 9. Advent of Selenium Why can’t I test for the performance No good scope eitherSo many errors! Time consuming Conventional manual testing has several drawbacks and is extremely monotonous
  • 10. Drawbacks of Manual Testing Time consuming
  • 11. Drawbacks of Manual Testing Error-prone Time consuming
  • 12. Drawbacks of Manual Testing Limited scope for testingError prone Time consuming
  • 13. Drawbacks of Manual Testing Time consuming Why can’t I test for the performance?? Limited scope for testingError prone
  • 14. Advent of Selenium Why can’t I test for the performance No good scope eitherSo many errors! Time consuming Selenium originated in 2004 - as a tool for testing web applications
  • 15. Advent of Selenium Why can’t I test for the performance No good scope eitherSo many errors! Time consuming Selenium originated in 2004 - as a tool for testing web applications It was developed by Jason Huggins, a programmer at ThoughtWorks
  • 16. Advent of Selenium Why can’t I test for the performance No good scope eitherSo many errors! Time consuming Selenium originated in 2004 - as a tool for testing web applications It was developed by Jason Huggins, a programmer at ThoughtWorks It competed against other automation testing tools like QTP (Quick test Professional) developed by HP and RFT(Rational functional tester) developed by IBM
  • 17. Advent of Selenium Why can’t I test for the performance No good scope eitherSo many errors! Time consuming Selenium originated in 2004 - as a tool for testing web applications It was developed by Jason Huggins, a programmer at ThoughtWorks It competed against other automation testing tools like QTP (Quick test Professional) developed by HP and RFT(Rational functional tester) developed by IBM Selenium was developed as JavaScriptTestRunner and evolved over years as a powerful automated testing tool
  • 18. Widely used automation testing tool What is Selenium?
  • 19. Widely used automation testing tool Tests web applications across various browsers What is Selenium?
  • 20. Widely used automation testing tool Tests web applications across various browsers Consists of a set of software tools that facilitate testing What is Selenium?
  • 21. Widely used automation testing tool Tests web applications across various browsers Consists of a set of software tools that facilitate testing Platform independent and open source What is Selenium?
  • 22. Selenium is primarily developed in Java Script What is Selenium?
  • 23. Selenium is primarily developed in Java Script It provides a record/playback tool for authoring tests without learning a test scripting language What is Selenium?
  • 24. Selenium is primarily developed in Java Script It provides a record/playback tool for authoring tests without learning a test scripting language The tests can also be coded in a number of popular programming languages What is Selenium?
  • 25. Selenium is primarily developed in Java Script It provides a record/playback tool for authoring tests without learning a test scripting language Selenium can be deployed on Windows, Linux, and Macintosh What is Selenium? The tests can also be coded in a number of popular programming languages
  • 26. Selenium suite Selenium IDE Selenium test suite Browser plugin that records user actions and exports them as a reusable script Selenium suite
  • 27. Selenium suite Selenium IDE Selenium RC Selenium test suite • Multi-programming and multi browser support • Deprecated in Selenium 2 Browser plugin that records user actions and exports them as a reusable script Selenium suite
  • 28. Selenium suite Selenium IDE Selenium RC Selenium WebDriver Selenium test suite Browser plugin that records user actions and exports them as a reusable script • Uses APIs to interact with the browser • Successor of Selenium RC • Multi-programming and multi browser support • Deprecated in Selenium 2 Selenium suite
  • 29. Selenium suite Selenium IDE Selenium RC Selenium WebDriver Selenium Grid Selenium test suite Browser plugin that records user actions and exports them as a reusable script • Runs multiple tests against different browsers. • Capable of running tests in parallel • Uses APIs to interact with the browser • Successor of Selenium RC • Multi-programming and multi browser support • Deprecated in Selenium 2 Selenium suite
  • 30. Selenium suite Selenium 1 Selenium 2 Selenium 3 Selenium 4 Selenium IDE Selenium RC Grid Selenium IDE *Selenium RC Grid Selenium IDE Selenium WebDriver Grid Selenium WebDriver Version 4 is just around the corner. However, Alpha has been released!
  • 32. Let’s first discuss Selenium RC and its shortcomings
  • 33. Working principle of Selenium RC Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.
  • 34. Selenium test script RC server Web browser Web server Test script written in any programming language like JAVA, PHP, Python etc. Working principle of Selenium RC
  • 35. Selenium test script RC server Web browser Web server Selenium Server receives Selenium commands from your test program, interprets them, and reports the results back to the program Working principle of Selenium RC
  • 36. Selenium test script RC server Web browser Web server The Web browser is injected with Selenium core which interprets and executes the Selenese commands used in the test script Working principle of Selenium RC
  • 37. Selenium test script RC server Web browser Web server The Web browser can now interact with the web server accordingly Working principle of Selenium RC
  • 38. Selenium test script RC Server Web browser Web server RC consists of an additional server that acts as a middle man This additional setup complicates the architecture The time taken for execution of commands is longer Shortcomings of Selenium RC
  • 39. How does Selenium WebDriver overcome this?
  • 40. Selenium test script Selenium WebDriver Web browser Web server
  • 41. Selenium test script Selenium WebDriver Web serverWeb browser Selenium-WebDriver does not use an additional server It makes direct calls to the browser using each browser’s native support for automation The execution time for commands is shorter due to the simple architecture
  • 42. A single function has several commands Selenium RC APIs in Selenium RC
  • 43. A single function has several commands Selenium RC APIs in Selenium RC Redundant & confusing APIs
  • 44. A single function has several commands Selenium RC APIs in Selenium RC Redundant & confusing APIs
  • 45. A single function has several commands Selenium RC APIs in Selenium RC Redundant & confusing APIs Different browsers interpret different commands differently
  • 46. A single function has several commands Selenium RC APIs in Selenium RC Redundant & confusing APIs Different browsers interpret different commands differently Selenium WebDriver
  • 47. A single function has several commands Selenium RC APIs in Selenium RC Redundant & confusing APIs Different browsers interpret different commands differently Selenium WebDriver Simple and easy to remember
  • 48. A single function has several commands Selenium RC APIs in Selenium RC Redundant & confusing APIs Different browsers interpret different commands differently Selenium WebDriver No Redundant commands Simple and easy to remember
  • 49. A single function has several commands Selenium RC APIs in Selenium RC Redundant & confusing APIs No Redundant commands Simple and easy to remember Different browsers interpret different commands differently Selenium WebDriver
  • 50. Browser support in Selenium RC Requires a real browser to operate on Does not support HtmlUnit browser No time spent in loading web elements Supports a headless, GUI-less HtmlUnit browser Selenium WebDriverSelenium RC
  • 51. Browser support in Selenium WebDriver Requires a real browser to operate on Does not support HtmlUnit browser No time spent in loading web elements Supports a headless, GUI-less HtmlUnit browser Selenium RC Selenium WebDriver
  • 52. Simple architecture Faster execution Interacts directly with the browser Easy to use APIs Support for HtmlUnit browser Complex architecture Slower execution Requires an RC server to interact with the browser Confusing APIs No support for HtmlUnit browser To summarize… Selenium WebDriverSelenium RC
  • 53. What is Selenium WebDriver?
  • 54. What is Selenium WebDriver? Selenium WebDriver is a tool that runs automated tests across different browsers
  • 55. What is Selenium WebDriver?
  • 56. What is Selenium WebDriver? Founded by Simon Stewart in 2006
  • 57. What is Selenium WebDriver? Founded by Simon Stewart in 2006 It is a cross platform testing framework
  • 58. Founded by Simon Stewart in 2006 It is a cross platform testing framework Programming interface to create and run test cases What is Selenium WebDriver?
  • 59. What is Selenium WebDriver? Founded by Simon Stewart in 2006 It is a cross platform testing framework Programming interface to create and run test cases Makes provision to perform action on web elements
  • 60. What is Selenium WebDriver? Founded by Simon Stewart in 2006 It is a cross platform testing framework Programming interface to create and run test cases Makes provision to perform action on web elements Does not require a core engine like RC and interacts natively with the browser applications
  • 61. What is Selenium WebDriver? Founded by Simon Stewart in 2006 It is a cross platform testing framework Programming interface to create and run test cases Makes provision to perform action on web elements Does not require a core engine like RC and interacts natively with the browser applications Supports Java, C#, PHP, Python, Perl, Ruby etc.
  • 62. What is Selenium WebDriver? Founded by Simon Stewart in 2006 It is a cross platform testing framework Programming interface to create and run test cases Makes provision to perform action on web elements Does not require a core engine like RC and interacts natively with the browser applications Supports Java, C#, PHP, Python, Perl, Ruby etc. Supports frameworks like TestNG, JUnit, NUnit
  • 64. JSON Wire Protocol Browsers • Chrome browser • Firefox browser • Opera browser • Safari browser • Edge browser Http over Http Server Browser Drivers • ChromeDriver • FirefoxDriver • OperaDriver • SafariDriver • EdgeDriver Http over Http Server Architecture of Selenium WebDriver Selenium test script (Java, PHP, Perl…) Selenium test script is the test code written in any of the mentioned programming languages that is interpreted by the driver
  • 65. Browsers • Chrome browser • Firefox browser • Opera browser • Safari browser • Edge browser Browser Drivers • ChromeDriver • FirefoxDriver • OperaDriver • SafariDriver • EdgeDriver Http over Http Server Http over Http Server Architecture of Selenium WebDriver Selenium test script (Java, PHP, Perl…) JSON Wire Protocol JSON Wire Protocol provides a transport mechanism to transfer data between a server and a client. JSON Wire Protocol serves as an industry standard for various web services
  • 66. Browsers • Chrome browser • Firefox browser • Opera browser • Safari browser • Edge browser Http over Http Server Http over Http Server Architecture of Selenium WebDriver Selenium test script (Java, PHP, Perl…) JSON Wire Protocol Browser Drivers • ChromeDriver • FirefoxDriver • OperaDriver • SafariDriver • EdgeDriver Selenium uses drivers, specific to each browser in order to establish a secure connection with the browser
  • 67. Architecture of Selenium WebDriver Selenium test script (Java, PHP, Perl…) JSON Wire Protocol Browser Drivers • ChromeDriver • FirefoxDriver • OperaDriver • SafariDriver • EdgeDriver Browsers • Chrome browser • Firefox browser • Opera browser • Safari browser • Edge browser Http over Http Server Http over Http Server Selenium WebDriver supports various web browsers to test and run applications on
  • 69. Cannot handle pop-ups and advertisement windows Limitations of WebDriver Cannot test mobile applications. Requires frameworks like Appium
  • 70. Cannot handle pop-ups and advertisement windows Limitations of WebDriver Cannot test mobile applications. Requires frameworks like Appium Can only perform sequential testing hence requires Grid for parallel testing
  • 71. Cannot handle pop-ups and advertisement windows Limitations of WebDriver Cannot test mobile applications. Requires frameworks like Appium Can only perform sequential testing hence requires Grid for parallel testing Limited reporting. Third party tools like TestNG are required CrossBrowserTesting
  • 72. Cannot handle pop-ups and advertisement windows Limitations of WebDriver Cannot test mobile applications. Requires frameworks like Appium Can only perform sequential testing hence requires Grid for parallel testing Limited reporting. Third party tools like TestNG are required CrossBrowserTesting Limited image testing
  • 73. Demo: Automation testing using WebDriver
  • 74. Browser APIs and their usage Get Commands driver.get(“https://www.google.co.in”); driver.getTitle(); driver.getCurrentUrl(); driver.getPageSource(); driver.getWindowHandle(); driver.getWindowHandles(); Navigation Commands driver.navigate().to("https://www.ebay.in/"); driver.navigate().back(); driver.navigate().forward(); driver.navigate().refresh(); Locator Commands driver.findElement(By.id(“user”)); driver.findElement(By.linkText(“click here”)); driver.findElement(By.name(“admin”)); driver.findElement(By.className(“main-container”)); driver.findElement(By.cssSelector(“#primary”)); driver.findElement(By.xpath(“//*[@id="primary"]”)); Browser Commands driver.close() Closes the current browser window driver.quit() Quits the entire browser session
  • 75. Demo Use case Usecase 1 : As a user, I want to login to ebay.in and search for “JBL Speakers” Then I want to check the day’s deals Usecase 2 : From ebay.in, navigate to Simplilearn website. And navigate back to ebay.in Usecase 3: From ebay.in, I want to print the page title and close the browser
  • 77. Key Takeaways • What is Selenium • Limitations of Selenium RC and how WebDriver overcomes it • What is Selenium WebDriver? • Architecture of Selenium WebDriver • Limitations of Selenium WebDriver • Browser APIs and their usage

Editor's Notes