SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Más de onlinemindq

Más 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
 

Último

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Último (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

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