SlideShare a Scribd company logo
Selenium Web Test Automation Tool Rohit Nayak Talentica Software
Agenda Demo What is Selenium? Why? Pros/Cons Writing test cases using Selenium Architecture Best Practices
Demo Record a test in Selenium IDE Review test in Selenese HTML
Similar Tools Bad Boy  Sahi  Silk Test, QTP (paid) Grinder Others: Watir, OpenSTA
What is Selenium? Test tool for web applications Actually runs in a browser Supports tests in many languages Selenese (pure HTML, no backend required) Java, C#, Perl, Python, Ruby Record/playback (Firefox plugin: Selenium IDE) Open Source with corporate backing Lives at selenium.org
Advantages Free! Can test across multiple browsers  Mimics actual user experience Ajax / CSS support Use language of choice Large user community Great tools: CubicTest, Grid, HRMES
Common Problems in Web Testing Record/replay is not reusable, is fragile Managing test cases UI Changes make tests brittle
Problems  Performance (~HTMLUnit, WebTest) Reporting (~WebTest) Fancy CSS/Ajax needs tricky coding Data dependency should be avoided
Best Practices All tests should be source control One test per function not per page Nightly runs Separate environ specific variables  Automate fixed function, others manual Abstract out functionality and reuse them Parameterize your tests Framework!!
Code for testability Demand this from Development Visible feedback on actions (hidden values in case div appears/disappears) (dev-only) url for database teardown Use of IDs for important UI elements Good HTML Good logs
Demo 2 Show same test written in Java Show same test written in PHP
Java Example public void testGoogleTestSearch()  throws Exception { selenium.open("http://www.google.com/webhp"); assertEquals("Google", selenium.getTitle()); selenium.type("q", "Selenium OpenQA"); selenium.click("btnG"); selenium.waitForPageToLoad("5000"); assertEquals("Selenium OpenQA - Google Search", selenium.getTitle()); }
JUnit  public void setUp() throws Exception { selenium = new DefaultSelenium( "localhost", 4444, "*chrome", "http://www.google.com"); selenium.start(); } public void tearDown() throws Exception { selenium.stop(); }
Some Selenese Commands submit type isTextPresent createCookie isElementPresent fireEvent dragdrop open goBack Input mouseOver storeText  assertSelected  keyPress getTitle isVisible waitForCondition click
Element locators ID: id=foo Name: name=foo First ID, then name: identifier=foo DOM: document.forms[‘myform’].myDropdown XPath: xpath=//table[@id='table1']//tr[4]/td[2] Link Text: link=sometext Sensible defaults, e.g. xpath if starts with //
Selenium Modules Selenium Core Selenium IDE Selenium Remote Control Client Drivers  JS Extensions
How it works
Selenium Usage Patterns Creating Tests Recording using Selenium IDE Writing tests in Selenese  Building a Framework Running Tests Through IDE Using Selenium RC Using Framework
Advanced Cubic Test HRMES Selenium Grid BrowserMob Tellurium

More Related Content

PPTX
Selenium web driver
PPTX
Introduction to Selenium Web Driver
PDF
Web UI test automation instruments
PPT
Selenium Concepts
PPTX
Automation Testing by Selenium Web Driver
PPT
Selenium
PDF
Selenium webdriver interview questions and answers
PPTX
Selenium WebDriver
Selenium web driver
Introduction to Selenium Web Driver
Web UI test automation instruments
Selenium Concepts
Automation Testing by Selenium Web Driver
Selenium
Selenium webdriver interview questions and answers
Selenium WebDriver

What's hot (20)

PPT
Selenium
PPT
Selenium Architecture
PPT
Web Test Automation with Selenium
PPTX
Test Automation and Selenium
DOCX
Selenium WebDriver FAQ's
PDF
Selenium Basics Tutorial
PPT
Selenium
PPSX
Selenium WebDriver with Java
PPT
selenium training | selenium course | selenium video tutorial | selenium for ...
PDF
Selenium presentation
PPTX
Introduction to selenium
ODP
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
PPTX
An overview of selenium webdriver
PPTX
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
DOCX
Selenium interview Q&A
PDF
Selenium Overview
PDF
Introduction to Automation Testing and Selenium overiew
PPTX
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
PPT
Selenium Presentation at Engineering Colleges
PDF
Automation Testing using Selenium
Selenium
Selenium Architecture
Web Test Automation with Selenium
Test Automation and Selenium
Selenium WebDriver FAQ's
Selenium Basics Tutorial
Selenium
Selenium WebDriver with Java
selenium training | selenium course | selenium video tutorial | selenium for ...
Selenium presentation
Introduction to selenium
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
An overview of selenium webdriver
Selenium WebDriver Tutorial For Beginners | What Is Selenium WebDriver | Sele...
Selenium interview Q&A
Selenium Overview
Introduction to Automation Testing and Selenium overiew
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Selenium Presentation at Engineering Colleges
Automation Testing using Selenium
Ad

Viewers also liked (20)

PPTX
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
PPT
Introduction to Progamming Applications for the iPhone
PPT
Groovy & Grails: Scripting for Modern Web Applications
PPTX
Selenium introduction
PPT
Automation test
PDF
Practical Test Automation Deep Dive
PPTX
An Efficient encryption using Data compression towards Steganography,introduc...
PPT
Hardware and Software parallelism
PPTX
Continuous Delivery Conference 2014 - Bas Dijkstra
PDF
Automation Using Selenium Webdriver
PPT
RC4&RC5
PDF
Introduction to selenium_grid_workshop
PDF
Tj bot 0317實作坊 組裝篇
PPTX
Get Started With Selenium 3 and Selenium 3 Grid
PDF
Cv tech info-04.2015-2-net
PDF
Selenium grid workshop london 2016
PPTX
Continuous Delivery With Selenium Grid And Docker
PPT
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
PPTX
Selenium web driver
PDF
Cv technicien informatique
Selenium Tutorial For Beginners | What Is Selenium? | Selenium Automation Tes...
Introduction to Progamming Applications for the iPhone
Groovy & Grails: Scripting for Modern Web Applications
Selenium introduction
Automation test
Practical Test Automation Deep Dive
An Efficient encryption using Data compression towards Steganography,introduc...
Hardware and Software parallelism
Continuous Delivery Conference 2014 - Bas Dijkstra
Automation Using Selenium Webdriver
RC4&RC5
Introduction to selenium_grid_workshop
Tj bot 0317實作坊 組裝篇
Get Started With Selenium 3 and Selenium 3 Grid
Cv tech info-04.2015-2-net
Selenium grid workshop london 2016
Continuous Delivery With Selenium Grid And Docker
Understanding Selenium/RC, Webdriver Architecture and developing the page obj...
Selenium web driver
Cv technicien informatique
Ad

Similar to Introduction to Selenium (20)

ZIP
Browser-Based testing using Selenium
PPT
Selenium
ODP
Integrating Selenium testing infrastructure into Scala Project
PDF
How To Use Selenium Successfully
PPT
Selenium
PDF
How To Use Selenium Successfully (Java Edition)
PPT
Selenium Primer
PPTX
Selenium ppt
PDF
How To Use Selenium Successfully (Java Edition)
PPTX
Learn SELENIUM at ASIT
PPT
Selenium Primer
PDF
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
PPTX
Automated Web Testing With Selenium
PDF
Mastering Test Automation: How to Use Selenium Successfully
PPTX
Selenium ui paradigm - DDD North 2
PPTX
Selenium Automation
ODP
PPT
PDF
Getting Started with Selenium
PPT
Selenium
Browser-Based testing using Selenium
Selenium
Integrating Selenium testing infrastructure into Scala Project
How To Use Selenium Successfully
Selenium
How To Use Selenium Successfully (Java Edition)
Selenium Primer
Selenium ppt
How To Use Selenium Successfully (Java Edition)
Learn SELENIUM at ASIT
Selenium Primer
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Automated Web Testing With Selenium
Mastering Test Automation: How to Use Selenium Successfully
Selenium ui paradigm - DDD North 2
Selenium Automation
Getting Started with Selenium
Selenium

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Machine learning based COVID-19 study performance prediction
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
KodekX | Application Modernization Development
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
Machine learning based COVID-19 study performance prediction
MYSQL Presentation for SQL database connectivity
Per capita expenditure prediction using model stacking based on satellite ima...
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MIND Revenue Release Quarter 2 2025 Press Release
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
KodekX | Application Modernization Development
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
Approach and Philosophy of On baking technology
Spectroscopy.pptx food analysis technology
Advanced methodologies resolving dimensionality complications for autism neur...
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)

Introduction to Selenium

  • 1. Selenium Web Test Automation Tool Rohit Nayak Talentica Software
  • 2. Agenda Demo What is Selenium? Why? Pros/Cons Writing test cases using Selenium Architecture Best Practices
  • 3. Demo Record a test in Selenium IDE Review test in Selenese HTML
  • 4. Similar Tools Bad Boy Sahi Silk Test, QTP (paid) Grinder Others: Watir, OpenSTA
  • 5. What is Selenium? Test tool for web applications Actually runs in a browser Supports tests in many languages Selenese (pure HTML, no backend required) Java, C#, Perl, Python, Ruby Record/playback (Firefox plugin: Selenium IDE) Open Source with corporate backing Lives at selenium.org
  • 6. Advantages Free! Can test across multiple browsers Mimics actual user experience Ajax / CSS support Use language of choice Large user community Great tools: CubicTest, Grid, HRMES
  • 7. Common Problems in Web Testing Record/replay is not reusable, is fragile Managing test cases UI Changes make tests brittle
  • 8. Problems Performance (~HTMLUnit, WebTest) Reporting (~WebTest) Fancy CSS/Ajax needs tricky coding Data dependency should be avoided
  • 9. Best Practices All tests should be source control One test per function not per page Nightly runs Separate environ specific variables Automate fixed function, others manual Abstract out functionality and reuse them Parameterize your tests Framework!!
  • 10. Code for testability Demand this from Development Visible feedback on actions (hidden values in case div appears/disappears) (dev-only) url for database teardown Use of IDs for important UI elements Good HTML Good logs
  • 11. Demo 2 Show same test written in Java Show same test written in PHP
  • 12. Java Example public void testGoogleTestSearch() throws Exception { selenium.open("http://www.google.com/webhp"); assertEquals("Google", selenium.getTitle()); selenium.type("q", "Selenium OpenQA"); selenium.click("btnG"); selenium.waitForPageToLoad("5000"); assertEquals("Selenium OpenQA - Google Search", selenium.getTitle()); }
  • 13. JUnit public void setUp() throws Exception { selenium = new DefaultSelenium( "localhost", 4444, "*chrome", "http://www.google.com"); selenium.start(); } public void tearDown() throws Exception { selenium.stop(); }
  • 14. Some Selenese Commands submit type isTextPresent createCookie isElementPresent fireEvent dragdrop open goBack Input mouseOver storeText assertSelected keyPress getTitle isVisible waitForCondition click
  • 15. Element locators ID: id=foo Name: name=foo First ID, then name: identifier=foo DOM: document.forms[‘myform’].myDropdown XPath: xpath=//table[@id='table1']//tr[4]/td[2] Link Text: link=sometext Sensible defaults, e.g. xpath if starts with //
  • 16. Selenium Modules Selenium Core Selenium IDE Selenium Remote Control Client Drivers JS Extensions
  • 18. Selenium Usage Patterns Creating Tests Recording using Selenium IDE Writing tests in Selenese Building a Framework Running Tests Through IDE Using Selenium RC Using Framework
  • 19. Advanced Cubic Test HRMES Selenium Grid BrowserMob Tellurium