SlideShare a Scribd company logo
Selenium WorkshopSelenium Workshop
By Atirek GuptaBy Atirek Gupta
Out of scopeOut of scope
 When and why to do functional test automation.
 Test specification.
 Test data management.
 Detailed architecture of Browser.
 Going deeper into Java Script
 Build tools, CI and VCS
AgendaAgenda
 Origin of Selenium
 Understanding same origin policy
 Interacting with HTML using JavaScript
 How Selenium-RC and WebDriver works
 Locators
 More about Selenium and WebDriver
 Overview of how browser works
 Exploring WebDriver API’s with examples
 Building test automation framework using Java and WebDriver
Origin of SeleniumOrigin of Selenium
 Selenium first came to life in 2004.
 Selenium was written in pure JavaScript.
 These scripts are injected into the web page, thus
simulating user activity.
 Limitations due to browser security policy called
SOP(Same origin policy).
HTML DOM Tree of ObjectsHTML DOM Tree of Objects
Interacting with HTML using JavaScriptInteracting with HTML using JavaScript
 JavaScript is a scripting language designed primarily
for adding interactivity to Web pages.
 Some JavaScript methods and interaction with browser
e.g.
 document.getElementById(“id”).innerHtml = “Some
text”
 document.getElementById(“id”).click
 Let’s do some hands on.
Understanding same origin policyUnderstanding same origin policy
How Selenium RC worksHow Selenium RC works
How WebDriverHow WebDriver
worksworks
• It uses the browser’s native
support for automation (different
for each browser)
Browser SupportBrowser Support
Selenium-WebDriver supports the following browsers along with the
operating systems these browsers are compatible with.
Google Chrome
Internet Explorer 6, 7, 8, 9, 10 - 32 and 64-bit where applicable
Firefox: latest ESR, previous ESR, current release, one previous release
Safari,Opera
HtmlUnit, Phantomjs
Android (with Selendroid or appium), iOS (with ios-driver or appium)
How Browser WorksHow Browser Works
LocatorsLocators
CSS
XPath
More about Selenium-More about Selenium-
WebDriverWebDriver
How does WebDriver know if the page is completely loaded?
When document.readyState is “complete”
More about Selenium-More about Selenium-
WebDriverWebDriver
 What is StaleElementReferenceException
 What causes them?
 Page Refresh
 JavaScript MVC frameworks
 Elements being re-rendered
More about Selenium-More about Selenium-
WebDriverWebDriver
 Can WebDriver execute javascript commands on DOM?
 WebElement element = driver.findElement(By.id("gbqfd"));
 JavascriptExecutor executor = (JavascriptExecutor)driver;
 executor.executeScript("arguments[0].click();", element);
More about Selenium-More about Selenium-
WebDriverWebDriver
 Handling : Explicit and Implicit Waits.
 driver.manage().timeouts().implicitlyWait(10,TimeUnit.SEC
ONDS)
 driver.manage().timeouts().pageLoadTimeout(10,
TimeUnit.SECONDS);
 WebElement element = (new WebDriverWait(driver,10))
.
until(ExpectedConditions.elementToBeClickable(By.Id(“id”))
).click
Hands on with WebDriverHands on with WebDriver
API’sAPI’s
Reference -
http://selenium.googlecode.com/git/docs/api/java/index.html
Key principle for designing /Key principle for designing /
building an Automationbuilding an Automation
Framework?Framework?
 Readable
 Re-Usable
 Maintainable
 Well Abstracted
 Scalable
 Browser support?
 Tests to be run in distributed environment or on one machine?
 …
Components of frameworkComponents of framework
Let’s codeLet’s code
Thank YouThank You
Atirek Gupta
atirekg@gmail.com, agupta@thoughtworks.com

More Related Content

What's hot

Selenium
SeleniumSelenium
Selenium
mdiliyazm
 
Selenium
SeleniumSelenium
Selenium
Adam Goucher
 
Selenium WebDriver with Java
Selenium WebDriver with JavaSelenium WebDriver with Java
Selenium WebDriver with Java
Fayis-QA
 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
P.V.G'S COET, PUNE - 09
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
Deepak Mittal
 
Selenium WebDriver FAQ's
Selenium WebDriver FAQ'sSelenium WebDriver FAQ's
Selenium WebDriver FAQ's
Praveen Gorantla
 
selenium training | selenium course | selenium video tutorial | selenium for ...
selenium training | selenium course | selenium video tutorial | selenium for ...selenium training | selenium course | selenium video tutorial | selenium for ...
selenium training | selenium course | selenium video tutorial | selenium for ...
Nancy Thomas
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
Sachin-QA
 
Selenium
SeleniumSelenium
Selenium
Andrew Krug
 
Designing keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with SeleniumDesigning keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with Selenium
Edureka!
 
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Edureka!
 
Selenium By Pravin Mishra
Selenium By Pravin MishraSelenium By Pravin Mishra
Selenium By Pravin Mishra
Pravin Mishra
 
Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
Mindfire Solutions
 
How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)
Dasun Eranthika
 
Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011
hugs
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
Selenium
SeleniumSelenium
Selenium
Satyam Pandey
 
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
Daniel Herken
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Edureka!
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
srivinayak
 

What's hot (20)

Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium WebDriver with Java
Selenium WebDriver with JavaSelenium WebDriver with Java
Selenium WebDriver with Java
 
Selenium presentation
Selenium presentationSelenium presentation
Selenium presentation
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
 
Selenium WebDriver FAQ's
Selenium WebDriver FAQ'sSelenium WebDriver FAQ's
Selenium WebDriver FAQ's
 
selenium training | selenium course | selenium video tutorial | selenium for ...
selenium training | selenium course | selenium video tutorial | selenium for ...selenium training | selenium course | selenium video tutorial | selenium for ...
selenium training | selenium course | selenium video tutorial | selenium for ...
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Selenium
SeleniumSelenium
Selenium
 
Designing keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with SeleniumDesigning keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with Selenium
 
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
Selenium Framework using Java | Selenium Tutorial | Selenium Training Online ...
 
Selenium By Pravin Mishra
Selenium By Pravin MishraSelenium By Pravin Mishra
Selenium By Pravin Mishra
 
Selenium IDE LOCATORS
Selenium IDE LOCATORSSelenium IDE LOCATORS
Selenium IDE LOCATORS
 
How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)
 
Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011Selenium 2 - PyCon 2011
Selenium 2 - PyCon 2011
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
 
Selenium
SeleniumSelenium
Selenium
 
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
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
 
Selenium WebDriver with C#
Selenium WebDriver with C#Selenium WebDriver with C#
Selenium WebDriver with C#
 

Viewers also liked

Selenium Architecture
Selenium ArchitectureSelenium Architecture
Selenium Architecture
rohitnayak
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Pavan Kumar
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
Naresh Chintalcheru
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
Return on Intelligence
 
Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics Tutorial
Clever Moe
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
vivek_prahlad
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
Swati Bansal
 
Difference between selenium WebDriver and Selenium RC
Difference between selenium WebDriver and Selenium RCDifference between selenium WebDriver and Selenium RC
Difference between selenium WebDriver and Selenium RC
ankesh49
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Anirudh Raja
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016
Marcus Merrell
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
Barbara Gonzalez
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object pattern
Michael Palotas
 
Keyword-driven Test Automation Framework
Keyword-driven Test Automation FrameworkKeyword-driven Test Automation Framework
Keyword-driven Test Automation Framework
Mikhail Subach
 
Test Automation - Principles and Practices
Test Automation - Principles and PracticesTest Automation - Principles and Practices
Test Automation - Principles and Practices
Anand Bagmar
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
Sauce Labs
 
Same origin policy
Same origin policySame origin policy
Same origin policy
Vivek Madurai
 
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Capgemini
 
Same Origin Policy Weaknesses
Same Origin Policy WeaknessesSame Origin Policy Weaknesses
Same Origin Policy Weaknesses
kuza55
 
Browser Internals-Same Origin Policy
Browser Internals-Same Origin PolicyBrowser Internals-Same Origin Policy
Browser Internals-Same Origin Policy
Krishna T
 
Weightlifting at SimplySocial
Weightlifting at SimplySocialWeightlifting at SimplySocial
Weightlifting at SimplySocial
Bogdan Gaza
 

Viewers also liked (20)

Selenium Architecture
Selenium ArchitectureSelenium Architecture
Selenium Architecture
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Selenium Basics Tutorial
Selenium Basics TutorialSelenium Basics Tutorial
Selenium Basics Tutorial
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Difference between selenium WebDriver and Selenium RC
Difference between selenium WebDriver and Selenium RCDifference between selenium WebDriver and Selenium RC
Difference between selenium WebDriver and Selenium RC
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Selenium grid workshop london 2016
Selenium grid workshop london 2016Selenium grid workshop london 2016
Selenium grid workshop london 2016
 
Continuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And DockerContinuous Delivery With Selenium Grid And Docker
Continuous Delivery With Selenium Grid And Docker
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object pattern
 
Keyword-driven Test Automation Framework
Keyword-driven Test Automation FrameworkKeyword-driven Test Automation Framework
Keyword-driven Test Automation Framework
 
Test Automation - Principles and Practices
Test Automation - Principles and PracticesTest Automation - Principles and Practices
Test Automation - Principles and Practices
 
Test Automation Framework Designs
Test Automation Framework DesignsTest Automation Framework Designs
Test Automation Framework Designs
 
Same origin policy
Same origin policySame origin policy
Same origin policy
 
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
Cross-Site Request Forgery Vulnerability: “A Sleeping Giant”
 
Same Origin Policy Weaknesses
Same Origin Policy WeaknessesSame Origin Policy Weaknesses
Same Origin Policy Weaknesses
 
Browser Internals-Same Origin Policy
Browser Internals-Same Origin PolicyBrowser Internals-Same Origin Policy
Browser Internals-Same Origin Policy
 
Weightlifting at SimplySocial
Weightlifting at SimplySocialWeightlifting at SimplySocial
Weightlifting at SimplySocial
 

Similar to Understanding Selenium/RC, Webdriver Architecture and developing the page object test automation framework

Selenium -Test automation for web applications
Selenium -Test automation for web applicationsSelenium -Test automation for web applications
Selenium -Test automation for web applications
AnisGhelissi
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
AnuragMourya8
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
Sun Technlogies
 
Indic threads pune12-improve testing efficiency with selenium webdriver
Indic threads pune12-improve testing efficiency with selenium webdriverIndic threads pune12-improve testing efficiency with selenium webdriver
Indic threads pune12-improve testing efficiency with selenium webdriver
IndicThreads
 
Best Selenium Online Training
Best Selenium Online TrainingBest Selenium Online Training
Best Selenium Online Training
Samatha Kamuni
 
Automation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra SolutionsAutomation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra Solutions
Quontra Solutions
 
Top 15 Selenium WebDriver Interview Questions and Answers.pdf
Top 15 Selenium WebDriver Interview Questions and Answers.pdfTop 15 Selenium WebDriver Interview Questions and Answers.pdf
Top 15 Selenium WebDriver Interview Questions and Answers.pdf
AnanthReddy38
 
Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2
Sebastiano Armeli
 
Protractor overview
Protractor overviewProtractor overview
Protractor overview
Abhishek Yadav
 
Web driver training
Web driver trainingWeb driver training
Web driver training
Dipesh Bhatewara
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
政億 林
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
Nikhil Kapoor
 
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptxA Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
Matthew Allen
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
Anuraj S.L
 
Selenium
SeleniumSelenium
Selenium
Kalyan ch
 
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdfanoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
SunilNagaraj10
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
Peyman Fakharian
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
orbitprojects
 
Selenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser TestingSelenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser Testing
Sarah Elson
 
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
Haitham Refaat
 

Similar to Understanding Selenium/RC, Webdriver Architecture and developing the page object test automation framework (20)

Selenium -Test automation for web applications
Selenium -Test automation for web applicationsSelenium -Test automation for web applications
Selenium -Test automation for web applications
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 
Indic threads pune12-improve testing efficiency with selenium webdriver
Indic threads pune12-improve testing efficiency with selenium webdriverIndic threads pune12-improve testing efficiency with selenium webdriver
Indic threads pune12-improve testing efficiency with selenium webdriver
 
Best Selenium Online Training
Best Selenium Online TrainingBest Selenium Online Training
Best Selenium Online Training
 
Automation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra SolutionsAutomation with Selenium Presented by Quontra Solutions
Automation with Selenium Presented by Quontra Solutions
 
Top 15 Selenium WebDriver Interview Questions and Answers.pdf
Top 15 Selenium WebDriver Interview Questions and Answers.pdfTop 15 Selenium WebDriver Interview Questions and Answers.pdf
Top 15 Selenium WebDriver Interview Questions and Answers.pdf
 
Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2
 
Protractor overview
Protractor overviewProtractor overview
Protractor overview
 
Web driver training
Web driver trainingWeb driver training
Web driver training
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptxA Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
A Definitive Guide to Mastering Selenium WebDriver Automation Effectively.pptx
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
Selenium
SeleniumSelenium
Selenium
 
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdfanoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
anoverviewofseleniumwebdriver-160407055026 (pdf.io).pdf
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Selenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser TestingSelenium Web Driver Tutorial for Cross Browser Testing
Selenium Web Driver Tutorial for Cross Browser Testing
 
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
 

Recently uploaded

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 

Recently uploaded (20)

Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 

Understanding Selenium/RC, Webdriver Architecture and developing the page object test automation framework

  • 1. Selenium WorkshopSelenium Workshop By Atirek GuptaBy Atirek Gupta
  • 2. Out of scopeOut of scope  When and why to do functional test automation.  Test specification.  Test data management.  Detailed architecture of Browser.  Going deeper into Java Script  Build tools, CI and VCS
  • 3. AgendaAgenda  Origin of Selenium  Understanding same origin policy  Interacting with HTML using JavaScript  How Selenium-RC and WebDriver works  Locators  More about Selenium and WebDriver  Overview of how browser works  Exploring WebDriver API’s with examples  Building test automation framework using Java and WebDriver
  • 4. Origin of SeleniumOrigin of Selenium  Selenium first came to life in 2004.  Selenium was written in pure JavaScript.  These scripts are injected into the web page, thus simulating user activity.  Limitations due to browser security policy called SOP(Same origin policy).
  • 5. HTML DOM Tree of ObjectsHTML DOM Tree of Objects
  • 6. Interacting with HTML using JavaScriptInteracting with HTML using JavaScript  JavaScript is a scripting language designed primarily for adding interactivity to Web pages.  Some JavaScript methods and interaction with browser e.g.  document.getElementById(“id”).innerHtml = “Some text”  document.getElementById(“id”).click  Let’s do some hands on.
  • 7. Understanding same origin policyUnderstanding same origin policy
  • 8. How Selenium RC worksHow Selenium RC works
  • 9. How WebDriverHow WebDriver worksworks • It uses the browser’s native support for automation (different for each browser)
  • 10. Browser SupportBrowser Support Selenium-WebDriver supports the following browsers along with the operating systems these browsers are compatible with. Google Chrome Internet Explorer 6, 7, 8, 9, 10 - 32 and 64-bit where applicable Firefox: latest ESR, previous ESR, current release, one previous release Safari,Opera HtmlUnit, Phantomjs Android (with Selendroid or appium), iOS (with ios-driver or appium)
  • 11. How Browser WorksHow Browser Works
  • 13. More about Selenium-More about Selenium- WebDriverWebDriver How does WebDriver know if the page is completely loaded? When document.readyState is “complete”
  • 14. More about Selenium-More about Selenium- WebDriverWebDriver  What is StaleElementReferenceException  What causes them?  Page Refresh  JavaScript MVC frameworks  Elements being re-rendered
  • 15. More about Selenium-More about Selenium- WebDriverWebDriver  Can WebDriver execute javascript commands on DOM?  WebElement element = driver.findElement(By.id("gbqfd"));  JavascriptExecutor executor = (JavascriptExecutor)driver;  executor.executeScript("arguments[0].click();", element);
  • 16. More about Selenium-More about Selenium- WebDriverWebDriver  Handling : Explicit and Implicit Waits.  driver.manage().timeouts().implicitlyWait(10,TimeUnit.SEC ONDS)  driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);  WebElement element = (new WebDriverWait(driver,10)) . until(ExpectedConditions.elementToBeClickable(By.Id(“id”)) ).click
  • 17. Hands on with WebDriverHands on with WebDriver API’sAPI’s Reference - http://selenium.googlecode.com/git/docs/api/java/index.html
  • 18. Key principle for designing /Key principle for designing / building an Automationbuilding an Automation Framework?Framework?  Readable  Re-Usable  Maintainable  Well Abstracted  Scalable  Browser support?  Tests to be run in distributed environment or on one machine?  …
  • 21.
  • 22. Thank YouThank You Atirek Gupta atirekg@gmail.com, agupta@thoughtworks.com

Editor's Notes

  1. 1. Selenium was a tremendous tool, it wasn’t without its drawbacks. Because of its Javascript based automation engine and the security limitations browsers apply to Javascript, different things became impossible to do. 2. Because Selenium was written in pure Javascript, its initial design required developers to host Core and their tests on the same server as the application under test (AUT). 3. There is a java script security restriction (same origin policy) which lets you modify html of page using js only if js also originates from the same domain as html.
  2. JavaScript can change all the HTML elements in the page JavaScript can change all the HTML attributes in the page JavaScript can change all the CSS styles in the page JavaScript can remove existing HTML elements and attributes JavaScript can add new HTML elements and attributes JavaScript can react to all existing HTML events in the page JavaScript can create new HTML events in the page
  3. Lets understand SOP with some live example.
  4. Selenium RC Server acts as a "middleman” Selenium RC Server "injects" a Javascript program called Selenium Core into the browser. Once injected, Selenium Core will start receiving instructions relayed by the RC Server from your test program. Then the instructions are received, Selenium Core will execute them as Javascript commands. The browser will obey the instructions of Selenium Core, and will relay its response to the RC Server. The RC Server will receive the response of the browser and then display the results to you. RC Server will fetch the next instruction from your test script to repeat the whole cycle.
  5. user interface: this includes the address bar browser engine: marshals actions between the UI and the rendering engine. rendering engine : responsible for displaying requested content. Internet Explorer uses Trident, Firefox uses Gecko, Safari uses WebKit. Chrome and Opera (from version 15) use Blink, a fork of WebKit. Networking: for network calls such as HTTP requests, UI backend: used for drawing basic widgets like combo boxes JavaScript interpreter. Used to parse and execute JavaScript code. Data Storage: Browsers also support storage mechanisms such as localStorage, IndexedDB, WebSQL and FileSystem. Think of the areas where you need to retest your app in different browsers based on the information you know about different rendering engines
  6. Many JavaScript MVC frameworks can update contents of a list or a control by rapidly tearing down and recreating the same element.
  7. Build tool: follows a standard design and development process Well-defined process should be established for Team communication, Library versioning and Artifacts creation