SlideShare a Scribd company logo
1 of 36
AUTOMATED UI TESTING
Presented by Chung Chieh-Lun
Integration Test
“Without automated end to end tests delivering a new
release of an application becomes burdensome !”
Integration Test
Integration Test
 Only UI exposed
 The investment pays off quickly
 Automated tests
Selenium
“Selenium automates browser”
Selenium
 Free
 Whatever users do in the browser
 Get everything at:
http://www.seleniumhq.org/
Can Selenium automate app?
Selenium Language Bindings
 Core
 Third Party
Java C# Ruby Python Javascript
How to use
 Java JRE/JDK
 Install latest Selenium Server
https://selenium-release.storage.googleapis.com/index.html
 Install Java Selenium Client Driver
ex. ChromeDriver
http://chromedriver.storage.googleapis.com/index.html
Selenium Components
 Selenium IDE
 Selenium RC (Remote Control)
 Selenium Grid
 Selenium 2.0 (Webdriver)
Selenium IDE
 Firefox add-on
 Exports as a reusable script to play back
Selenium RC
Launch RC Server
Write Your Commands
Send to RC Server
Interact with the browser
Respond to RC Server
Fetch new instructions
Repeat
Selenium RC
Step 1 -> RC Server relay instructions from your test program
Step 2 -> Selenium Core will execute the instructions as
javascript commands
Step 3 -> The browser will obey the instructions of Selenium
Core and relay its response to the RC Server
Step 4 -> The RC Server will receive the response of the
browser and then display the results to you
Step 5 -> RC Server will fetch the next instruction from your
test script to repeat the whole cycle
Webdriver[Selenium 2.0]
Controls the browser from the OS level
Redundancy
Confusion
Webdriver Selenium RC
Speed
API
Broser
Support
Need a real,
visible browser
HtmlUnit browser
Simple
Headless HtmlUnit Browser
 GUI-Less browser for Java programs
 A way to simulate a browser for testing
 http://htmlunit.sourceforge.net/gettingStarted.html
If you want to...
Run your tests on different browser and operating system
Third-Party
OR?
Selenium Grid
 Distribute test execution across several machines
 Save time in execution of your test suites
http://www.guru99.com/introduction-to-selenium-
grid.html
WebDriverJS
 Asynchronous
 Example : Google search [Java]
driver.get("http://www.google.com");
driver.findElement(By.name("q")).sendKeys("webdriver");
driver.findElement(By.name("btnG")).click();
assertEquals("webdriver - Google Search",
driver.getTitle());
WebDriverJS
Promise
An object that can execute whatever you give it after it has finished
driver.get("http://www.google.com")
.then(function() {
return driver.findElement(By.name("q")); })
.then(function(q) {
return q.sendKeys("webdriver"); })
.then(function() {
return driver.findElement(By.name("btnG")); })
.then(function(btnG) {
return btnG.click(); })
.then(function() {
return driver.getTitle(); })
.then(function(title) {
assertEquals("webdriver - Google Search", title); });
ControlFlow
 A wrapper for Promise
 It maintains a list of schedule actions
 The exposed functions in WebDriverJS do not
actually do their stuff
 It puts every new entry in the then callback of
the last entry of the list
ControlFlow
NodeJS NPM
 Selenium RC
 npm install soda
https://github.com/learnboost/soda
NodeJS NPM
WebDriverJS for Node
 npm install selenium-webdriver
 npm install webdriverio
 npm install protractor
More...
https://github.com/beatfactor/nightwatchnpm
Protractor
API:https://angular.github.io/protractor/#/api
$ webdriver-manager update
$ webdriver-manager start
$ protractor spec.js
Demo
Test Items
 Redirect /login
 Show the signin panel
 Autheticate a user
Workflow Integration
Can we just run
a single command
and
everything go smooth ?
Gulp
“Automate and enhance your workflow”
Gulp
Javascript Test Framework
Install and start a standalone
selenium server
Synchronised browser testing
Gulp – BrowserSync
npm install browserSync
http://www.browsersync.io/
npm install selenium-standalone
Install and start selenium server
Gulp
Gulp Test
Demo
Test Items
 Link button
 Set cookie value
 Take a screenshot

More Related Content

What's hot

What's hot (20)

Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
 
Selenium
SeleniumSelenium
Selenium
 
QSpiders - Selenium Webdriver
QSpiders - Selenium WebdriverQSpiders - Selenium Webdriver
QSpiders - Selenium Webdriver
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium WebDriver - Test automation for web applications
Selenium WebDriver - Test automation for web applicationsSelenium WebDriver - Test automation for web applications
Selenium WebDriver - Test automation for web applications
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 Grid
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Selenium topic 1- Selenium Basic
Selenium topic 1-  Selenium BasicSelenium topic 1-  Selenium Basic
Selenium topic 1- Selenium Basic
 
Selenium
SeleniumSelenium
Selenium
 
How To Automate Cross Browser Testing
How To Automate Cross Browser TestingHow To Automate Cross Browser Testing
How To Automate Cross Browser Testing
 
Selenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and WorkingSelenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and Working
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium Primer
Selenium PrimerSelenium Primer
Selenium Primer
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
 
Selenium Webdriver
Selenium WebdriverSelenium Webdriver
Selenium Webdriver
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 

Viewers also liked

Grails: Aumenta tu productividad en tus aplicaciones web Java
Grails: Aumenta tu productividad en tus aplicaciones web JavaGrails: Aumenta tu productividad en tus aplicaciones web Java
Grails: Aumenta tu productividad en tus aplicaciones web Java
Dani Latorre
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
昱劭 劉
 
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
camp_drupal_ua
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Fizah Ali
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
Roger Barnes
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
onlinemindq
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
Jobsket.com, Grails en un proyecto real
Jobsket.com, Grails en un proyecto realJobsket.com, Grails en un proyecto real
Jobsket.com, Grails en un proyecto real
Jobsket
 

Viewers also liked (18)

Integrando Groovy & Grails en el proceso de desarrollo
Integrando Groovy & Grails en el proceso de desarrolloIntegrando Groovy & Grails en el proceso de desarrollo
Integrando Groovy & Grails en el proceso de desarrollo
 
Grails: Aumenta tu productividad en tus aplicaciones web Java
Grails: Aumenta tu productividad en tus aplicaciones web JavaGrails: Aumenta tu productividad en tus aplicaciones web Java
Grails: Aumenta tu productividad en tus aplicaciones web Java
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 
Selenium ui paradigm - DDD North 2
Selenium ui paradigm - DDD North 2Selenium ui paradigm - DDD North 2
Selenium ui paradigm - DDD North 2
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
Victor Dyptan.Using Selenium IDE for automated testing.Drupal Camp Kyiv 2011
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Selenium como herramienta de Web Scraping
Selenium como herramienta de Web ScrapingSelenium como herramienta de Web Scraping
Selenium como herramienta de Web Scraping
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
 
Automated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDEAutomated Testing for Websites With Selenium IDE
Automated Testing for Websites With Selenium IDE
 
Test Automation and Selenium
Test Automation and SeleniumTest Automation and Selenium
Test Automation and Selenium
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
 
Fin fest 2014 - Internet of Things and APIs
Fin fest 2014 - Internet of Things and APIsFin fest 2014 - Internet of Things and APIs
Fin fest 2014 - Internet of Things and APIs
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Jobsket.com, Grails en un proyecto real
Jobsket.com, Grails en un proyecto realJobsket.com, Grails en un proyecto real
Jobsket.com, Grails en un proyecto real
 

Similar to Selenium

Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug
Philip Schlesinger
 
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
camp_drupal_ua
 
Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
coreyjack
 

Similar to Selenium (20)

Selenium Automation in Java Using HttpWatch Plug-in
 Selenium Automation in Java Using HttpWatch Plug-in  Selenium Automation in Java Using HttpWatch Plug-in
Selenium Automation in Java Using HttpWatch Plug-in
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Selenium training
Selenium trainingSelenium training
Selenium training
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
探討Web ui自動化測試工具
探討Web ui自動化測試工具探討Web ui自動化測試工具
探討Web ui自動化測試工具
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug
 
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 - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Sakai10 Selenium Workshop
Sakai10 Selenium WorkshopSakai10 Selenium Workshop
Sakai10 Selenium Workshop
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
 
Selenium Testing with TestingBot.com
Selenium Testing with TestingBot.comSelenium Testing with TestingBot.com
Selenium Testing with TestingBot.com
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
Component Based Unit Testing ADF with Selenium
Component Based Unit Testing ADF with SeleniumComponent Based Unit Testing ADF with Selenium
Component Based Unit Testing ADF with Selenium
 
Automated Testing ADF with Selenium
Automated Testing ADF with SeleniumAutomated Testing ADF with Selenium
Automated Testing ADF with Selenium
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch
 
Selenium
SeleniumSelenium
Selenium
 
Automate Web Apps With Selenium
Automate Web Apps With SeleniumAutomate Web Apps With Selenium
Automate Web Apps With Selenium
 
Automated Testing using JavaScript
Automated Testing using JavaScriptAutomated Testing using JavaScript
Automated Testing using JavaScript
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

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
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Selenium