SlideShare une entreprise Scribd logo
1  sur  26
 
Automated Web Testing using Selenium Perficient China Waylon Zhang Yahoo!m:  waylon_zhang2008 [email_address]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Warm-up ,[object Object]
Prerequisite ,[object Object],[object Object],[object Object],[object Object]
What is Selenium? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Selenium components *Selenese is the set of Selenium Commands that run you tests. Don’t support If or For (While) statements C#, Java, Perl, PHP, Python, Ruby Selenese *Selenese  Programming Languages Yes No No Support I&O Yes No No Need Jre Yes Yes No Different Domain Yes Yes Yes Support Https/SSL No No Yes AUT Server side installed Firefox, IE,Safari Firefox Firefox, IE,Safari Browsers Selenium Remote Control Selenium IDE Selenium Core
How to use Selenium RC to develop
How Selenium RC Works?
How Selenium RC Works? (cont.)
Selenium Solutions of HTTPS ,[object Object],[object Object],[object Object],[object Object]
Selenium to Test Click Flash (1/2)
Selenium to test Click Flash (2/2) ,[object Object],[object Object],[object Object],[object Object]
Selenium to test Ajax ,[object Object]
Add API to Selenium (1/2)  ,[object Object],[object Object],[object Object],[object Object],[object Object]
Add API to Selenium (2/2)  ,[object Object],[object Object],[object Object],[object Object]
Selenium Open Issues ,[object Object]
Problems in Selenium ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tellurium’s solution package com.perficient.tellurium.webapp.ui import org.tellurium.dsl.DslContext public class TelluriumModule extends DslContext { public void defineUi(){ ui.Container(uid: "root", clocator: [tag: "table", name: "Tellurium"]){ InputBox(uid: "firstName", clocator: [tag: "input", type: "text", name: "FirstName"]) InputBox(uid: "lastName", clocator: [tag: "input", type: "text", name: "LastName"]) InputBox(uid: "fullName", clocator: [tag: "input", type: "text", name: "FullName"]) InputBox(uid: "save", clocator: [tag: "input", type: "button", value: "Save"], respond:  ["click"]) } } public void getFullName(String firstName,String lastName){ type "root.firstName",firstName type "root.lastName",lastName pause 500 click "root.save" } }
What is Tellurium? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What challenges are addressed in Tellurium ,[object Object],[object Object],[object Object],[object Object]
What challenges are addressed in Tellurium ,[object Object],[object Object],[object Object]
Summarization: Advantage/Disadvantage ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tellurium ,[object Object],[object Object],[object Object],[object Object],[object Object],Selenium Disadvantage Advantage Pre-condition
Best Practices ,[object Object],[object Object],[object Object],[object Object]
Q&A
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Simplilearn
 

Tendances (20)

Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
 
Selenium
SeleniumSelenium
Selenium
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
Python selenium
Python seleniumPython selenium
Python selenium
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
 
Selenium WebDriver
Selenium WebDriverSelenium WebDriver
Selenium WebDriver
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
 

En vedette

III Jornada de Perinatologia de Joinville
III Jornada de Perinatologia de JoinvilleIII Jornada de Perinatologia de Joinville
III Jornada de Perinatologia de Joinville
Marcio Fossari
 
Prezentare spocs dec._2011_agenda_digitala
Prezentare spocs dec._2011_agenda_digitalaPrezentare spocs dec._2011_agenda_digitala
Prezentare spocs dec._2011_agenda_digitala
Monica ANGHEL
 
Barbaresques et esclavage des blancs
Barbaresques et esclavage des blancsBarbaresques et esclavage des blancs
Barbaresques et esclavage des blancs
Aschkel Levi
 

En vedette (15)

Pfm poblacion
Pfm  poblacionPfm  poblacion
Pfm poblacion
 
sredharselvam resume
sredharselvam resumesredharselvam resume
sredharselvam resume
 
III Jornada de Perinatologia de Joinville
III Jornada de Perinatologia de JoinvilleIII Jornada de Perinatologia de Joinville
III Jornada de Perinatologia de Joinville
 
Prezentare spocs dec._2011_agenda_digitala
Prezentare spocs dec._2011_agenda_digitalaPrezentare spocs dec._2011_agenda_digitala
Prezentare spocs dec._2011_agenda_digitala
 
CodeIgniter For Project : Lesson 104 - Controller & View
CodeIgniter For Project : Lesson 104 - Controller & ViewCodeIgniter For Project : Lesson 104 - Controller & View
CodeIgniter For Project : Lesson 104 - Controller & View
 
Gamefish ireland website
Gamefish ireland websiteGamefish ireland website
Gamefish ireland website
 
Gill TESOL 2010 Talkng At Length: Strategies and Genres of Extended Discourse
Gill TESOL 2010 Talkng At Length: Strategies and Genres of Extended DiscourseGill TESOL 2010 Talkng At Length: Strategies and Genres of Extended Discourse
Gill TESOL 2010 Talkng At Length: Strategies and Genres of Extended Discourse
 
Code igniter 20160119
Code igniter 20160119Code igniter 20160119
Code igniter 20160119
 
Titulada presencial
Titulada presencialTitulada presencial
Titulada presencial
 
Barbaresques et esclavage des blancs
Barbaresques et esclavage des blancsBarbaresques et esclavage des blancs
Barbaresques et esclavage des blancs
 
Listas jornada mañana grupos de media fortalecida
Listas jornada mañana  grupos de media fortalecidaListas jornada mañana  grupos de media fortalecida
Listas jornada mañana grupos de media fortalecida
 
Calendario academico 2017
Calendario academico 2017Calendario academico 2017
Calendario academico 2017
 
Agosto 2016 apoyos_005695
Agosto 2016 apoyos_005695Agosto 2016 apoyos_005695
Agosto 2016 apoyos_005695
 
[eh2016] - Novità Prestashop 1.7 - Luca Mastroianni, Roberto Di Stefano, Anto...
[eh2016] - Novità Prestashop 1.7 - Luca Mastroianni, Roberto Di Stefano, Anto...[eh2016] - Novità Prestashop 1.7 - Luca Mastroianni, Roberto Di Stefano, Anto...
[eh2016] - Novità Prestashop 1.7 - Luca Mastroianni, Roberto Di Stefano, Anto...
 
[eh2016] - Web Advertising per Ecommerce: strategie e pratiche di automazione...
[eh2016] - Web Advertising per Ecommerce: strategie e pratiche di automazione...[eh2016] - Web Advertising per Ecommerce: strategie e pratiche di automazione...
[eh2016] - Web Advertising per Ecommerce: strategie e pratiche di automazione...
 

Similaire à Automated Web Testing Using Selenium

Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
coreyjack
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 

Similaire à Automated Web Testing Using Selenium (20)

Selenium RC Using Java and Maven + Maestro Integration
Selenium RC Using Java and Maven + Maestro IntegrationSelenium RC Using Java and Maven + Maestro Integration
Selenium RC Using Java and Maven + Maestro Integration
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
What is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptxWhat is Selenium Introduction to Selenium Testing.pptx
What is Selenium Introduction to Selenium Testing.pptx
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Selenium
SeleniumSelenium
Selenium
 
BCS Selenium Workshop
BCS Selenium WorkshopBCS Selenium Workshop
BCS Selenium Workshop
 
What is selenium
What is seleniumWhat is selenium
What is selenium
 
Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
 
Introduction to Selenium
Introduction to SeleniumIntroduction to Selenium
Introduction to Selenium
 
Selenium testing IDE 101
Selenium testing IDE 101Selenium testing IDE 101
Selenium testing IDE 101
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
 
Selenium
SeleniumSelenium
Selenium
 
Selenium - automated browser-based testing -
Selenium - automated browser-based testing -Selenium - automated browser-based testing -
Selenium - automated browser-based testing -
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Basics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote ControlBasics of Selenium IDE,Core, Remote Control
Basics of Selenium IDE,Core, Remote Control
 
Intro Of Selenium
Intro Of SeleniumIntro Of Selenium
Intro Of Selenium
 
Automated ui testing with selenium. drupal con london 2011
Automated ui testing with selenium. drupal con london 2011Automated ui testing with selenium. drupal con london 2011
Automated ui testing with selenium. drupal con london 2011
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Automated Web Testing Using Selenium

  • 1.  
  • 2. Automated Web Testing using Selenium Perficient China Waylon Zhang Yahoo!m: waylon_zhang2008 [email_address]
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Selenium components *Selenese is the set of Selenium Commands that run you tests. Don’t support If or For (While) statements C#, Java, Perl, PHP, Python, Ruby Selenese *Selenese Programming Languages Yes No No Support I&O Yes No No Need Jre Yes Yes No Different Domain Yes Yes Yes Support Https/SSL No No Yes AUT Server side installed Firefox, IE,Safari Firefox Firefox, IE,Safari Browsers Selenium Remote Control Selenium IDE Selenium Core
  • 8. How to use Selenium RC to develop
  • 10. How Selenium RC Works? (cont.)
  • 11.
  • 12. Selenium to Test Click Flash (1/2)
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Tellurium’s solution package com.perficient.tellurium.webapp.ui import org.tellurium.dsl.DslContext public class TelluriumModule extends DslContext { public void defineUi(){ ui.Container(uid: "root", clocator: [tag: "table", name: "Tellurium"]){ InputBox(uid: "firstName", clocator: [tag: "input", type: "text", name: "FirstName"]) InputBox(uid: "lastName", clocator: [tag: "input", type: "text", name: "LastName"]) InputBox(uid: "fullName", clocator: [tag: "input", type: "text", name: "FullName"]) InputBox(uid: "save", clocator: [tag: "input", type: "button", value: "Save"], respond: ["click"]) } } public void getFullName(String firstName,String lastName){ type "root.firstName",firstName type "root.lastName",lastName pause 500 click "root.save" } }
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Q&A
  • 26.

Notes de l'éditeur

  1. Notes
  2. -firefoxProfileTemplate ${selenium.home}/profiles/firefoxProfile
  3. Add js to user-extensions.js: Selenium.prototype.getTableRows = function(locator) { /** * Gets the number of rows in a table. * * @param locator element locator for table * @return number of rows in the table, 0 if none */ var table = this.browserbot.findElement(locator); return table.rows.length.toString(); }; Selenium.java: String getTableRows(String locator); DefaultSelenium.java: public String getTableRows(String locator){ return commandProcessor.getString("getTableRows", new String[] {locator,}); } Test Method: public void testTables() throws InterruptedException{ selenium.open("http://www.w3schools.com/tags/tag_table.asp"); Thread. sleep (10000); String rows= selenium.getTableRows("//table[@id='table3']"); System. out .println("rows count= "+rows); }
  4. Add js to user-extensions.js: Selenium.prototype.getTableRows = function(locator) { /** * Gets the number of rows in a table. * * @param locator element locator for table * @return number of rows in the table, 0 if none */ var table = this.browserbot.findElement(locator); return table.rows.length.toString(); }; Selenium.java: String getTableRows(String locator); DefaultSelenium.java: public String getTableRows(String locator){ return commandProcessor.getString("getTableRows", new String[] {locator,}); } Test Method: public void testTables() throws InterruptedException{ selenium.open("http://www.w3schools.com/tags/tag_table.asp"); Thread. sleep (10000); String rows= selenium.getTableRows("//table[@id='table3']"); System. out .println("rows count= "+rows); }
  5. XPath builder can build the XPath from the composite locator, i.e., a set of attributes. Starting with version 0.6.0, Tellurium supports jQuery selectors to address the problem of poor performance of XPath in Internet Explorer. jQuery selector builders are used to automatically generate jQuery selectors instead of XPath with the following advantages: Faster performance in IE. Leverage the power of jQuery to retrieve bulk data from the web by testing with one method call. New features provided by jQuery attribute selectors.
  6. Notes
  7. Notes