SlideShare une entreprise Scribd logo
1  sur  17
Selenium Open Source Tool
www.seleniumcoe.com
What is Selenium?
• Javascript framework that runs in your web-browser
• Works anywhere Javascript is supported
• Hooks for many other languages
– Java, Ruby, Python
• Can simulate a user navigating through pages and
then assert for specific marks on the pages
• All you need to really know is HTML to start using it
right away
www.seleniumcoe.com
Where to get it?
• You can use Selenium-Core and customize
everything
• But it is easier to just get a Firefox plug-in
“Selenium-IDE” that helps you “record” test
cases
• You can record how an app is being used and
then play back those recordings followed by
asserts
• Get everything at: www.openqa.org/selenium/
www.seleniumcoe.com
Selenium IDEThe root of web
application you
want to test
The list of
actions in the
actual test case
to execute
The log of the
events that were
executed, including
any errors or
warning that may
have occurred
www.seleniumcoe.com
Selenium IDE
Execution
Commands
Try the test in
the Web based
TestRunner
Reference of the
currently selected
command
Record test
actions
Specify
commands, includin
g asserts
www.seleniumcoe.com
Test Creation Demo
• Create test case to log into the gallery
• Create test case to log out of the gallery
www.seleniumcoe.com
Start Pixory
Connect to the Server
Go to the Login Screen
Hit the Record Button
www.seleniumcoe.com
Type in Username and Password IDE should update
Hit submit
Hit record again to
stop
www.seleniumcoe.com
Add assertTextPresent and
type the text to search for
Hit play to make sure your test
is successful
www.seleniumcoe.com
Creating a Test Suite
• A Test Suite in
Selenium is just
an HTML file that
contains a table
of links to tests
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Demo Test Suite</title>
</head>
<body>
<table id="suiteTable">
<tbody>
<tr><td>
<b>Demo Test Suite</b>
</td></tr>
<tr><td>
<a href="./testLogin.html">TestLogin</a>
</td></tr>
<tr><td>
<a href="./testLogout.html">TestLogout</a>
</td></tr>
</tbody>
</table>
</body>
</html>
www.seleniumcoe.com
Executing the Test Suite
• Selenium Core is a collection of Javascript
and HTML with iFrames
– Due to security concerns Core must be deployed
within the same server as the application being
hosted
– The simplest way to run Pixory is to just run the
Java application and let it use its own server
– Problems using Core with Pixory
• Selenium IDE is a plug-in for Firefox and thus
can go around these restrictions
www.seleniumcoe.com
Running the Test Suite
• We basically want to execute the test
suite using the Selenium IDE plug-in
TestRunner.html
chrome://selenium-
ide/content/selenium/TestRunner.html?baseURL=<BASE>&tes
t=file:///<TEST SUITE FILE>&auto=true
chrome://selenium-ide/content/selenium/TestRunner.html?
baseURL=http://localhost:8081&test=file:///Users/ms333/
projects/classes/running/v_and_v/hw3/selenium/test/Test
Suite.html&auto=true
www.seleniumcoe.com
Test Suite
www.seleniumcoe.com
Test Suite
Application
being tested
Test Cases
Steps of the
test case
Execution
Control
www.seleniumcoe.com
Test Runner Control
www.seleniumcoe.com
Test Runner Control
Run All Tests
Run Selected Test
Pause/Play
Execution Step through
Execution
Control Speed
of Execution
Highlight
Elements in the
Execution
View the DOM of
the current Page
being tested
Summary of the
Test
View the log of
the current
executionwww.seleniumcoe.com
TestRunner Demo
• Execute Tests created inside the Firefox
TestRunner
www.seleniumcoe.com

Contenu connexe

Plus de onlinemindq

Plus de onlinemindq (8)

Selenium 2
Selenium 2Selenium 2
Selenium 2
 
Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
 
Selenium (2)
Selenium (2)Selenium (2)
Selenium (2)
 
Selenium.ppt
Selenium.pptSelenium.ppt
Selenium.ppt
 
Selenium 2
Selenium 2Selenium 2
Selenium 2
 
A Buffer's Guide to Selenium 2
A Buffer's Guide to Selenium 2A Buffer's Guide to Selenium 2
A Buffer's Guide to Selenium 2
 
Selenium Open Source Tool
Selenium Open Source ToolSelenium Open Source Tool
Selenium Open Source Tool
 

Dernier

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Dernier (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Selenium.ppt

  • 1. Selenium Open Source Tool www.seleniumcoe.com
  • 2. What is Selenium? • Javascript framework that runs in your web-browser • Works anywhere Javascript is supported • Hooks for many other languages – Java, Ruby, Python • Can simulate a user navigating through pages and then assert for specific marks on the pages • All you need to really know is HTML to start using it right away www.seleniumcoe.com
  • 3. Where to get it? • You can use Selenium-Core and customize everything • But it is easier to just get a Firefox plug-in “Selenium-IDE” that helps you “record” test cases • You can record how an app is being used and then play back those recordings followed by asserts • Get everything at: www.openqa.org/selenium/ www.seleniumcoe.com
  • 4. Selenium IDEThe root of web application you want to test The list of actions in the actual test case to execute The log of the events that were executed, including any errors or warning that may have occurred www.seleniumcoe.com
  • 5. Selenium IDE Execution Commands Try the test in the Web based TestRunner Reference of the currently selected command Record test actions Specify commands, includin g asserts www.seleniumcoe.com
  • 6. Test Creation Demo • Create test case to log into the gallery • Create test case to log out of the gallery www.seleniumcoe.com
  • 7. Start Pixory Connect to the Server Go to the Login Screen Hit the Record Button www.seleniumcoe.com
  • 8. Type in Username and Password IDE should update Hit submit Hit record again to stop www.seleniumcoe.com
  • 9. Add assertTextPresent and type the text to search for Hit play to make sure your test is successful www.seleniumcoe.com
  • 10. Creating a Test Suite • A Test Suite in Selenium is just an HTML file that contains a table of links to tests <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Demo Test Suite</title> </head> <body> <table id="suiteTable"> <tbody> <tr><td> <b>Demo Test Suite</b> </td></tr> <tr><td> <a href="./testLogin.html">TestLogin</a> </td></tr> <tr><td> <a href="./testLogout.html">TestLogout</a> </td></tr> </tbody> </table> </body> </html> www.seleniumcoe.com
  • 11. Executing the Test Suite • Selenium Core is a collection of Javascript and HTML with iFrames – Due to security concerns Core must be deployed within the same server as the application being hosted – The simplest way to run Pixory is to just run the Java application and let it use its own server – Problems using Core with Pixory • Selenium IDE is a plug-in for Firefox and thus can go around these restrictions www.seleniumcoe.com
  • 12. Running the Test Suite • We basically want to execute the test suite using the Selenium IDE plug-in TestRunner.html chrome://selenium- ide/content/selenium/TestRunner.html?baseURL=<BASE>&tes t=file:///<TEST SUITE FILE>&auto=true chrome://selenium-ide/content/selenium/TestRunner.html? baseURL=http://localhost:8081&test=file:///Users/ms333/ projects/classes/running/v_and_v/hw3/selenium/test/Test Suite.html&auto=true www.seleniumcoe.com
  • 14. Test Suite Application being tested Test Cases Steps of the test case Execution Control www.seleniumcoe.com
  • 16. Test Runner Control Run All Tests Run Selected Test Pause/Play Execution Step through Execution Control Speed of Execution Highlight Elements in the Execution View the DOM of the current Page being tested Summary of the Test View the log of the current executionwww.seleniumcoe.com
  • 17. TestRunner Demo • Execute Tests created inside the Firefox TestRunner www.seleniumcoe.com