Submit Search
Upload
Selenium training
ā¢
Download as PPTX, PDF
ā¢
3 likes
ā¢
435 views
Shivaraj R
Follow
Selenium training
Read less
Read more
Software
Report
Share
Report
Share
1 of 67
Download now
Recommended
Mobile Application Testing
Mobile Application Testing
Shivaraj R
Ā
Top Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test Automation
Fred Beringer
Ā
Mobile Test Automation
Mobile Test Automation
Lee Barnes
Ā
Introduction To Mobile-Automation
Introduction To Mobile-Automation
Mindfire Solutions
Ā
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App Testing
Bitbar
Ā
Mobile Test Automation
Mobile Test Automation
Andreas Jakl
Ā
Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017
Perfecto Mobile
Ā
Mobile applications and automation testing
Mobile applications and automation testing
IndicThreads
Ā
Recommended
Mobile Application Testing
Mobile Application Testing
Shivaraj R
Ā
Top Best Practices for Successful Mobile Test Automation
Top Best Practices for Successful Mobile Test Automation
Fred Beringer
Ā
Mobile Test Automation
Mobile Test Automation
Lee Barnes
Ā
Introduction To Mobile-Automation
Introduction To Mobile-Automation
Mindfire Solutions
Ā
Best Practices for DevOps in Mobile App Testing
Best Practices for DevOps in Mobile App Testing
Bitbar
Ā
Mobile Test Automation
Mobile Test Automation
Andreas Jakl
Ā
Boston meetup blaze_meter_feb2017
Boston meetup blaze_meter_feb2017
Perfecto Mobile
Ā
Mobile applications and automation testing
Mobile applications and automation testing
IndicThreads
Ā
Android & iPhone App Testing
Android & iPhone App Testing
SWAAM Tech
Ā
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
Bitbar
Ā
Fight back android fragmentation
Fight back android fragmentation
Bitbar
Ā
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
Bitbar
Ā
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
Bitbar
Ā
Parallel Test Runs with Appium on Real Mobile Devices ā Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices ā Hands-on Webinar
Bitbar
Ā
SaaS Digital Assurance Lab
SaaS Digital Assurance Lab
Experitest
Ā
Top 10 Mobile Application Testing Tools | Edureka
Top 10 Mobile Application Testing Tools | Edureka
Edureka!
Ā
Webinar learn how to test any mobile app style from within eclipse using real...
Webinar learn how to test any mobile app style from within eclipse using real...
Perfecto Mobile
Ā
Using Selenium To Test Mobile? Meet Appium!
Using Selenium To Test Mobile? Meet Appium!
Sauce Labs
Ā
Mobile Application Testing
Mobile Application Testing
SWAAM Tech
Ā
SeeTestAutomation - Mobile Test Automation Tool by Experitest
SeeTestAutomation - Mobile Test Automation Tool by Experitest
Experitest
Ā
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
Andrii Dzynia
Ā
Getting started with appium
Getting started with appium
Pratik Patel
Ā
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
GlobalLogic Ukraine
Ā
Appium solution
Appium solution
Nael Abd Eljawad
Ā
Everything You Need To Know about Appium and Selenium
Everything You Need To Know about Appium and Selenium
Lizzy Guido (she/her)
Ā
[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team
Srijan Technologies
Ā
Cross Platform Mobile Test Automation using Selenium WebDriver by Perfecto Mo...
Cross Platform Mobile Test Automation using Selenium WebDriver by Perfecto Mo...
Perfecto Mobile
Ā
Best Practices in Mobile Game Testing
Best Practices in Mobile Game Testing
Bitbar
Ā
Selenium.pptx
Selenium.pptx
orbitprojects
Ā
Selenium presentation
Selenium presentation
shivani thakur
Ā
More Related Content
What's hot
Android & iPhone App Testing
Android & iPhone App Testing
SWAAM Tech
Ā
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
Bitbar
Ā
Fight back android fragmentation
Fight back android fragmentation
Bitbar
Ā
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
Bitbar
Ā
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
Bitbar
Ā
Parallel Test Runs with Appium on Real Mobile Devices ā Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices ā Hands-on Webinar
Bitbar
Ā
SaaS Digital Assurance Lab
SaaS Digital Assurance Lab
Experitest
Ā
Top 10 Mobile Application Testing Tools | Edureka
Top 10 Mobile Application Testing Tools | Edureka
Edureka!
Ā
Webinar learn how to test any mobile app style from within eclipse using real...
Webinar learn how to test any mobile app style from within eclipse using real...
Perfecto Mobile
Ā
Using Selenium To Test Mobile? Meet Appium!
Using Selenium To Test Mobile? Meet Appium!
Sauce Labs
Ā
Mobile Application Testing
Mobile Application Testing
SWAAM Tech
Ā
SeeTestAutomation - Mobile Test Automation Tool by Experitest
SeeTestAutomation - Mobile Test Automation Tool by Experitest
Experitest
Ā
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
Andrii Dzynia
Ā
Getting started with appium
Getting started with appium
Pratik Patel
Ā
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
GlobalLogic Ukraine
Ā
Appium solution
Appium solution
Nael Abd Eljawad
Ā
Everything You Need To Know about Appium and Selenium
Everything You Need To Know about Appium and Selenium
Lizzy Guido (she/her)
Ā
[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team
Srijan Technologies
Ā
Cross Platform Mobile Test Automation using Selenium WebDriver by Perfecto Mo...
Cross Platform Mobile Test Automation using Selenium WebDriver by Perfecto Mo...
Perfecto Mobile
Ā
Best Practices in Mobile Game Testing
Best Practices in Mobile Game Testing
Bitbar
Ā
What's hot
(20)
Android & iPhone App Testing
Android & iPhone App Testing
Ā
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
How to Reliably Measure and Optimize Graphics Performance of Your Android Games
Ā
Fight back android fragmentation
Fight back android fragmentation
Ā
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
Ā
How to Leverage Appium in Your Mobile App Testing
How to Leverage Appium in Your Mobile App Testing
Ā
Parallel Test Runs with Appium on Real Mobile Devices ā Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices ā Hands-on Webinar
Ā
SaaS Digital Assurance Lab
SaaS Digital Assurance Lab
Ā
Top 10 Mobile Application Testing Tools | Edureka
Top 10 Mobile Application Testing Tools | Edureka
Ā
Webinar learn how to test any mobile app style from within eclipse using real...
Webinar learn how to test any mobile app style from within eclipse using real...
Ā
Using Selenium To Test Mobile? Meet Appium!
Using Selenium To Test Mobile? Meet Appium!
Ā
Mobile Application Testing
Mobile Application Testing
Ā
SeeTestAutomation - Mobile Test Automation Tool by Experitest
SeeTestAutomation - Mobile Test Automation Tool by Experitest
Ā
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
Ā
Getting started with appium
Getting started with appium
Ā
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
Ā
Appium solution
Appium solution
Ā
Everything You Need To Know about Appium and Selenium
Everything You Need To Know about Appium and Selenium
Ā
[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team
Ā
Cross Platform Mobile Test Automation using Selenium WebDriver by Perfecto Mo...
Cross Platform Mobile Test Automation using Selenium WebDriver by Perfecto Mo...
Ā
Best Practices in Mobile Game Testing
Best Practices in Mobile Game Testing
Ā
Similar to Selenium training
Selenium.pptx
Selenium.pptx
orbitprojects
Ā
Selenium presentation
Selenium presentation
shivani thakur
Ā
Selenium Training in Chennai
Selenium Training in Chennai
Thecreating Experts
Ā
Selenium - Introduction
Selenium - Introduction
Amr E. Mohamed
Ā
Selenium.pptx
Selenium.pptx
Pandiya Rajan
Ā
Selenium Training in Chennai
Selenium Training in Chennai
Thecreating Experts
Ā
Selenium training in chennai
Selenium training in chennai
Thecreating Experts
Ā
Automation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
Pankaj Biswas
Ā
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
Vibrant Technologies & Computers
Ā
Selenium WebDriver training
Selenium WebDriver training
Vijay Krishnan Ramaswamy
Ā
Automated ui-testing
Automated ui-testing
Slobodan Lohja
Ā
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlot
Learning Slot
Ā
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
SpringPeople
Ā
Steps to write Selenium
Steps to write Selenium
Rohit Thakur
Ā
Selenium
Selenium
David Rajah Selvaraj
Ā
Selenium training in chennai
Selenium training in chennai
Thecreating Experts
Ā
Selenium
Selenium
abiramimaya
Ā
Selenium Automation
Selenium Automation
Anuradha Malalasena
Ā
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
Thecreating Experts
Ā
Selenium Webdriver Interview Questions
Selenium Webdriver Interview Questions
Jai Singh
Ā
Similar to Selenium training
(20)
Selenium.pptx
Selenium.pptx
Ā
Selenium presentation
Selenium presentation
Ā
Selenium Training in Chennai
Selenium Training in Chennai
Ā
Selenium - Introduction
Selenium - Introduction
Ā
Selenium.pptx
Selenium.pptx
Ā
Selenium Training in Chennai
Selenium Training in Chennai
Ā
Selenium training in chennai
Selenium training in chennai
Ā
Automation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
Ā
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
Ā
Selenium WebDriver training
Selenium WebDriver training
Ā
Automated ui-testing
Automated ui-testing
Ā
Interview Question & Answers for Selenium Freshers | LearningSlot
Interview Question & Answers for Selenium Freshers | LearningSlot
Ā
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
Ā
Steps to write Selenium
Steps to write Selenium
Ā
Selenium
Selenium
Ā
Selenium training in chennai
Selenium training in chennai
Ā
Selenium
Selenium
Ā
Selenium Automation
Selenium Automation
Ā
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
Ā
Selenium Webdriver Interview Questions
Selenium Webdriver Interview Questions
Ā
Recently uploaded
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
kalichargn70th171
Ā
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
Delhi Call girls
Ā
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
masabamasaba
Ā
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
Papp KrisztiƔn
Ā
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
Ā
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
Shane Coughlan
Ā
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
Delhi Call girls
Ā
CHEAP Call Girls in Pushp Vihar (-DELHI )š 9953056974š(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )š 9953056974š(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Ā
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
Willy Marroquin (WillyDevNET)
Ā
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
masabamasaba
Ā
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
masabamasaba
Ā
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
Ā
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
Ā
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
masabamasaba
Ā
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
SelfMade bd
Ā
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
AmarnathKambale
Ā
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
HimanshiGarg82
Ā
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
WSO2
Ā
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
Jittipong Loespradit
Ā
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
Presentation.STUDIO
Ā
Recently uploaded
(20)
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Ā
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
Ā
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
Ā
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
Ā
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
Ā
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
Ā
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
call girls in Vaishali (Ghaziabad) š >ą¼8448380779 š genuine Escort Service šāļøāļø
Ā
CHEAP Call Girls in Pushp Vihar (-DELHI )š 9953056974š(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )š 9953056974š(=)/CALL GIRLS SERVICE
Ā
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
Ā
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
Ā
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
Ā
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
Ā
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Ā
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
Ā
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Ā
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
Ā
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
Ā
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
Ā
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
Ā
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
Ā
Selenium training
1.
History of Selenium ā¢
Selenium was created by Jason Huggins in 2004. ā¢ Jason Huggins created a JavaScript program that would automatically control the browser's actions. He named this program as the "JavaScriptTestRunner.ā ā¢ Selenium 1, refers to Selenium RC. ā¢ Selenium RC and WebDriver are merged into a single framework to form Selenium 2. ā¢ Google, who has been a long time user of Selenium, had a developer named Simon Stewart who developed WebDriver. ā¢ This tool circumvented Seleniumās JavaScript sandbox to allow it to communicate with the Browser and Operating System directly using native methods ā¢ In 2008, Selenium and WebDriver merged technologies and intellectual intelligence to provide the best possible test automation framework ā¢ The latest version of Selenium is 3.0. Ā© Sun Technologies Inc. 1
2.
COMPONENTS OF SELENIUM ļ¼Selenium
is mainly built on 4 components. 1.Selenium IDE. 2.Selenium Remote Control (RC). 3.Selenium WebDriver. 4.Selenium Grid. Ā© Sun Technologies Inc. 2
3.
Selenium IDE ā¢ IDE
stands for Integrated Development Environment. ā¢ Which is used for Record and Play back the scripts. ā¢ It is an Add on for Mozilla Firefox, which means we can download the Selenium IDE from Mozilla Firefox and we can Record and Run the scripts in Mozilla Firefox only. ā¢ Selenium IDE is accountable for user actions. ā¢ We can Run the Recorded scripts against other browsers by using Selenium RC. Ā© Sun Technologies Inc. 3
4.
Architecture of Selenium
IDE Ā© Sun Technologies Inc. 4
5.
SELENIUM RC ā¢ RC
stands for Remote Control. ā¢ It is a Server and launches the Browser. ā¢ It acts as a API and Library of Selenium. ā¢ We need to configure the Selenium RC with the supported language, then we can automate the application. Ā© Sun Technologies Inc. 5
6.
Architecture of Selenium
RC Ā© Sun Technologies Inc. 6
7.
Selenium WebDriver ā¢ Selenium
is a robust set of tools that supports rapid development of test automation for web-based applications. ā¢ Selenium is an open source tool (No cost Involved in it). ā¢ Selenium supports the languages like HTML, Java, PHP, Perl, Python, Ruby and C#. ā¢ It supports the browsers like IE, Mozilla Firefox, Safari, Google Chrome and Opera. ā¢ It supports the operating systems like Windows, Linux and Mac. Ā© Sun Technologies Inc. 7
8.
Architecture of Selenium
Webdriver Ā© Sun Technologies Inc. 8
9.
Softwares Needed ā¢ JDK ā¢
Eclipse ā¢ Selenium jar files Can be Downloaded from http://www.seleniumhq.org/download/ ā¢ Drivers for IE and Chrome Ā© Sun Technologies Inc. 9
10.
Steps to install
Selenium webdriver in Eclipse ļ¼Step 1: Install Java on your computer. ā¢ Download and install the Java Software Development Kit (JDK). You download the JDK file from this location:http://www.oracle.com/technetwork/java/javase/download s/index.html Ā© Sun Technologies Inc. 10
11.
Ā© Sun Technologies
Inc. 11
12.
Installation of java ā¢
Step 1 : Right Click on MyComputer and click on properties . ā¢ Step 2 : Click on Advanced tab Ā© Sun Technologies Inc. 12
13.
ā¢ Step 3:
Click on Environment Variables ā¢ Step 4: Create a new class path for JAVA_HOME Ā© Sun Technologies Inc. 13
14.
ā¢ Step 5:
Enter the Variable name as JAVA_HOME and the value to your jdk bin path ie c:ProgramfilesJavajdk-1.6bin. ā¢ Step 6: NOTE Make sure u start with .; in the Value so that it doesn't corrupt the other environment variables which is already set. ā¢ Step 7: Follow the Above step and edit the Path in System Variables add the following ;c:ProgramfilesJavajdk-1.6bin in the value column. ā¢ Step 8: Your are done setting up your environment variables for your Java , In order to test it go to command prompt and type ā¢ Java ā¢ who will get a list of help doc ā¢ In order make sure whether compiler is setup Type in cmd ā¢ Javac ā¢ will get a list related to javac Ā© Sun Technologies Inc. 14
15.
ļ¼Step 2: Install
Eclipse IDE ā¢ Now download āEclipse IDE for Java Developersā. You can download eclipse from this location: http://www.eclipse.org/downloads/ Ā© Sun Technologies Inc. 15
16.
ā¢ Make sure
to choose correct link for downloading eclipses which corresponds to your OS i.e. for Windows 32 Bit and 64 Bit versions. ā¢ You should be able to download a ZIP file named āeclipse-java-kepler- SR1-win32-x86_64.zipā. ā¢ Inside the ZIP file, there is an āeclipseā folder which contains all the application files. So we can extract the āeclipseā folder anywhere in your PC. Let say we want to extract it to C drive. Ā© Sun Technologies Inc. 16
17.
ļ¼Step 3 ā
Download the Selenium Java Client Driver ā¢ You can download the Selenium Java Client Driver from this location:http://docs.seleniumhq.org/download/ Ā© Sun Technologies Inc. 17
18.
Add External Jars
to Java build path ā¢ Right click on āProjectā > Select Properties > Java build path. Then navigate to Libraries tab and click Add External JARs. Ā© Sun Technologies Inc. 18
19.
SELENIUM GRID ā¢ Selenium
Grid is used for launching the multiple browsers with supported operating system in parallel. ā¢ We can run the scripts on different browsers in parallel. ā¢ It allows you to easily run multiple tests in parallel, on multiple machines, in a heterogeneous environment. Ā© Sun Technologies Inc. 19
20.
Architecture of Selenium
Grid Ā© Sun Technologies Inc. 20
21.
what are tools
which help us to identify the elements? ļ¼Firebug and Firepath: These are two most popular tools to extract XPath of an element i.e location of an element on webpage. ļ¼FirePath: A very good tool for testing out XPath and CSS on the page. It will highlight all elements on the page that match the selector to your element location. ļ¼Xpath Checker: It is well known tool to find the XPath of an element. ļ¼IE Developer Tools: This is built into IE7, IE8 and IE9 that we can launch by pressing F12. It also has a number of features that Firebug has. ļ¼ Google Chrome Developer Tools: This, like IE, is built into the browser and will also allow you to find the elements on the page and be able to work out its XPath. Ā© Sun Technologies Inc. 21
22.
Types of Locators
in Selenium ļ¼Definition of Locator:- ā¢ Locator can be termed as an address that identifies a web element uniquely within the webpage. ā¢ Locators are the HTML properties of a web element which tells the Selenium about the web element it need to perform action on. ā¢ ID ā¢ ClassName ā¢ Name ā¢ Link Text ā¢ Partial Link Text ā¢ Tag Name ā¢ Xpath ā¢ CSS Selector Ā© Sun Technologies Inc. 22
23.
Id Locator ļ¼Locating an
Element By ID: ā¢ The most efficient way and preferred way to locate an element on a web page is By ID. ā¢ ID will be the unique on web page which can be easily identified. ā¢ IDs are the safest and fastest locator option and should always be the first choice even when there are multiple choices, It is like an Employee Number or Account which will be unique. ā¢ Example:- <input id=āāāemailā class=ātechā type=ātextā/> ā¢ Script looks like:- ā¢ Webelement Ele = driver.findElement(By.id(āemailā)); Ā© Sun Technologies Inc. 23
24.
Name Locator ļ¼Locating an
Element By Name: ā¢ When there is no Id to use, the next worth seeing if the desired element has a name attribute. ā¢ But make sure there the name cannot be unique all the times. ā¢ If there are multiple names, Selenium will always perform action on the first matching element ā¢ Example:- <input name="register" class="required" type="text"/> ā¢ Script looks like:- WebElement register= driver.findElement(By.name("register")); Ā© Sun Technologies Inc. 24
25.
LinkText Locator ļ¼Locating an
Element By LinkText: ā¢ Finding an element with link text is very simple. But make sure, there is only one unique link on the web page. ā¢ If there are multiple links with the same link text (such as repeated header and footer menu links), in such cases Selenium will perform action on the first matching element with link. ā¢ Example:- <a href="http://www.seleniumhq.org">Downloads</a> ā¢ Script looks like:- WebElement download = driver.findElement(By.linkText("Downloads")); Ā© Sun Technologies Inc. 25
26.
PartailLinkText Locator ļ¼Locating an
Element By Partial LinkText: In the same way as LinkText, PartialLinkText also works in the same pattern. ā¢ User can provide partial link text to locate the element. ā¢ Example:- <a href="seleniumhq.org">Download selenium server</a> ā¢ Script looks like:- ā¢ WebElement download = driver.findElement(By.PartialLinkText("Download")); Ā© Sun Technologies Inc. 26
27.
TagName Locator ļ¼Locating an
Element By TagName: ā¢ TagName can be used with Group elements like , Select and check- boxes / dropdowns. ā¢ Example:- Select select = new Select(driver.findElement(By.tagName("select"))); select.selectByVisibleText("Nov"); Ā© Sun Technologies Inc. 27
28.
ClassName Locator ļ¼Locating an
Element By Class Name: ā¢ There may be multiple elements with the same name, if we just use findElementByClassName, make sure it is only one. ā¢ If not the you need to extend using the classname and its sub elements. ā¢ Example:- ā¢ WebElement classtest =driver.findElement(By.className(āsampleā)); Ā© Sun Technologies Inc. 28
29.
CSS Selector ļ¼CSS Selector: ā¢
CSS mainly used to provide style rules for the web pages and we can use for identifying one or more elements in the web page using css. ā¢ We can you use Css Selectors to make sure scripts run with the same speed in IE browser. ā¢ CSS selector is always the best possible way to locate complex elements in the page. ā¢ Example:- ā¢ WebElement CheckElements = driver.findElements(By.cssSelector("input[id=email]")); Ā© Sun Technologies Inc. 29
30.
Xpath Locator ļ¼XPath, the
XML Path Language, is a query language for selecting nodes from an XML document. ļ¼XPath is the unique identification of an element on a webpage. ļ¼It acts as an address to a webelement like text, textbox, radio button, buttons,Check box, Combo box, Tabs, Links, Images and any other webelement on webpage. ļ¼In real world we use address to uniquely identify a house or a colony(in group of houses),similarly we use XPath to uniquely identify an element on the webpage. Ā© Sun Technologies Inc. 30
31.
Identification Techniques Using
XPath ļ¼Use ID attribute if available : ā¢ If the ID attribute is present for an object, use it in XPath even though the object can be identified with any other attributes. ID attribute should have the highest priority. For example : It can be used as //input[@id='username'] @ symbol indicate following is an attribute of the object. Ā© Sun Technologies Inc. 31
32.
Identification Techniques Using
XPath ļ¼Use combination of attributes in XPath : ā¢ If ID attribute is not available, any other attribute which uniquely identifies the object can be used. Also combination of 2 or more attributes can be used to identify the object such as name, type, class, value etc. This will make the XPath more specific. Examples: //input[@id='username' and @type='text'] //input[@id='username' or @name='username'] //div[@title='View Patient Details - xyz, abc' and contains(@id,'patient')] //div[attribute::title='View Patient Details - xyz, abc' and contains(attribute::id,'patient')] ļ¼Using combination of properties in XPath is useful in following cases : ā¢ There are cases where there does not exist any single attribute which uniquely identify the object ā¢ Even if there is exist single attribute which uniquely identifies the object, we can use combination of attributes to make Xpath more robust and hence there is less chances of failure in identification Ā© Sun Technologies Inc. 32
33.
Ā© Sun Technologies
Inc. 33 ļ¼Use Relative XPath instead of Absolute Xpath : ļ¼Absolute Path refers that Xpath starts from root i.e. from ā/ā to till the desired html element is reached such as /html/body/div[3]/div[2]/div/form/input[@id='username'] ļ¼Relative path refers to the Xpath that starts from specific point to the desired element. It starts with ā//ā. ā¢ It is always recommended to use Relative Xpath then Absolute xpath for following reasons. 1.Absolute Xpath will be very long compare to Relative xpath and hence difficult to manage 2.In case of Absolute Xpath , there are high chances that Xpath may break even if there are small changes introduced 3.Absolute Xpath has the disadvantage of typing the expression to a particular input structure ā¢ For example, we can have an absolute path as follows ā¢ /html/body/div[3]/div[2]/div/form/input[@id='username'] ā¢ Using Relative path we can have ā¢ //input[@id='username'] ā¢ //div[@id='ctl00_ContentPlaceHolder1_RadTabStrip_Tabs']//span[text()='Applications']
34.
Identification Techniques Using
XPath ļ¼Using .. (double dot symbol) to move to parent of the present node : ā¢ Assume that you are in a specific node and want to move to parent of that node then it is advisable to use .. (double dot symbol) to navigate to parent node then using Parent::<node type> or ancestor::<node type>. ā¢ This will reduce the length of the XPath and identification of node faster during execution. Consider the following example: the parent of the node td i.e. div can be reached using //li[text()='xyz, abc']/parent::ul/parent::div/parent::div[@id='patient_265'] //li[text()='xyz, abc']/../../..[@id='patient_265'] //li[text()='xyz, abc']/../../..[contains(@id,'patient')] //li[text()='xyz, abc']/ancestor::ul/ancestor::div/ancestor::div[@id='patient_265ā] //li[text()='xyz, abc']/ancestor::div[@title='View Patient Details - xyz, abc'] Using Child: //div[contains(@id,'patient')]/child::div/child::ul/li[text()='xyz, abc'] //div[@title='View Patient Details - xyz, abc']/descendant::li[text()='xyz, abc'] Ā© Sun Technologies Inc. 34
35.
Ā© Sun Technologies
Inc. 35 ļ¼Some of the XPath functions used are: ļ¼Position() āThis function is for locating specific html tag such as //input[position()=5] to locate 5th element ļ¼Last() ā This function is for locating last element node of the specific node type such as //input[last()]. Further it can be specified as //input[last()-1] to identify an node before the last node ļ¼Starts-with()- For Example : //div[starts-with(text(),āApproverā)]-Matches the element with string which begins with āApproverā //div[starts-with(@id,ātestā)]ā Matches the element with attribute begins with string ātestā ļ¼Contains () āFor example : //span[contains(text(),āApproverā)]āMatches any element with text contains the string āApproverā //span[contains(@id,ātestingā)] ā Matches any element with id attribute containing string ātesting
36.
Ā© Sun Technologies
Inc. 36 ļ¼Use Preceding-sibling or Following-sibling wherever applicable : ā¢ If it is needed to navigate to immediate following or preceding node of an element, then it is advisable to use following-sibling or preceding- sibling as applicable instead of just using following o preceding axes. ā¢ This will enable faster/efficient identification of such elements Examples: //li[text()='Next BG Due:']/preceding-sibling::li[text()='xyz, abc'] //li[text()='xyz, abc']/following-sibling::li[text()='Next BG Due:']
37.
TestNG ā¢ TestNG is
an open source automated testing framework, NG means Next Generation. ā¢ TestNG is similar to JUnit but it is much more powerful than JUnit but still itās inspired by Junit. ā¢ Cedric Beust who is the creator of TestNG. ā¢ Using TestNG we can write more flexible and powerful tests with help of easy annotations, grouping, sequencing & parametrizing. Ā© Sun Technologies Inc. 37
38.
Need of TestNG ā¢
TestNG can generate reports based on our Selenium test results. ā¢ WebDriver has no native mechanism for generating reports. ā¢ TestNG can generate the report in a readable format like the one shown below. Ā© Sun Technologies Inc. 38
39.
Annotations in TestNG ļ¼Def:-TestNG
which guides it for what to do next or which method should be executed next. TestNG has also facility to pass parameters with annotations. ā¢ @BeforeSuite: The annotated method will be run before all tests in this suite have run. ā¢ @AfterSuite: The annotated method will be run after all tests in this suite have run. ā¢ @BeforeTest: The annotated method will be run before any test method belonging to the classes inside the tag is run. ā¢ @AfterTest: The annotated method will be run after all the test methods belonging to the classes inside the tag have run. ā¢ @BeforeGroups: The list of groups that this configuration method will run before. This method is guaranteed to run shortly before the first test method that belongs to any of these groups is invoked. Ā© Sun Technologies Inc. 39
40.
ā¢ @AfterGroups: The
list of groups that this configuration method will run after. This method is guaranteed to run shortly after the last test method that belongs to any of these groups is invoked. ā¢ @BeforeClass: The annotated method will be run before the first test method in the current class is invoked. ā¢ @AfterClass: The annotated method will be run after all the test methods in the current class have been run. ā¢ @BeforeMethod: The annotated method will be run before each test method. ā¢ @AfterMethod: The annotated method will be run after each test method. ā¢ @Test: The annotated method is a part of a test case. Ā© Sun Technologies Inc. 40
41.
Example of without
TestNG code Ā© Sun Technologies Inc. 41
42.
Example of with
TestNG code Ā© Sun Technologies Inc. 42
43.
Use of testng.xml ā¢
Basically testng.xml is a configuration file. ā¢ We need to create testng.xml file to create and handle multiple test classes. ā¢ The xml file where you will configure your test run, set test dependency, include or exclude any test, method, class or package and set priority etc. ā¢ testng.xml looks like:- ā¢ <?xml version="1.0" encoding="UTF-8"?> ā¢ <suite configfailurepolicy="continue" name="Suite" parallel="none"> ā¢ <test name="Test" preserve-order="true"> ā¢ <classes> ā¢ <class name="TestCases.TestCases"/> ā¢ <methods> ā¢ <include name="TC_001"/> ā¢ <exclude name="2"/> ā¢ <exclude name="3"/> ā¢ </methods> ā¢ </classes> ā¢ </test> ā¢ </suite> Ā© Sun Technologies Inc. 43
44.
Advantages of TestNG ā¢
It gives the ability to produce HTML Reports of execution ā¢ Annotations made testers life easy ā¢ Test cases can be Grouped & Prioritized more easily ā¢ Parallel testing is possible ā¢ Generates Logs ā¢ Data Parameterization is possible Ā© Sun Technologies Inc. 44
45.
First Script in
Selenium WebDriver ā¢ We need to import following two packages: ļorg.openqa.selenium.* -> contains the WebDriver class needed to instantiate a new browser loaded with a specific driver. ļorg.openqa.selenium.firefox.FirefoxDriver -> contains the FirefoxDriver class needed to instantiate a Firefox-specific driver onto the browser instantiated by the WebDriver class. ā¢ If your test needs more complicated actions such as accessing another class, taking browser screenshots, or manipulating external files, definitely you will need to import more packages. Ā© Sun Technologies Inc. 45
46.
Ā© Sun Technologies
Inc. 46 ā¢ Instantiating objects and variables ļWebdriver driver=new FirefoxDriver(); ļ¼A FirefoxDriver class with no parameters means that the default Firefox profile will be launched by our Java program. ā¢ Launching a Browser Session ļdriver.get(baseUrl); ļWebDriver's get() method is used to launch a new browser session and directs it to the URL that you specify as its parameter.
47.
ā¢ Get the
Actual Page Title ļactualTitle = driver.getTitle(); ļ¼The WebDriver class has the getTitle() method that is always used to obtain the page title of the currently loaded page. ā¢ Compare the Expected and Actual Values if (actualTitle.contentEquals(expectedTitle)) //compare the actual title of the page with the expected one { System.out.println("Test Passed!"); } else { System.out.println("Test Failed"); } Ā© Sun Technologies Inc. 47
48.
ā¢ Terminating a
Browser Session ļ driver.close(); ļ§ The "close()" method is used to close the browser window. ā¢ Terminating the Entire Program ā¢ System.exit(0); ļ§ If you use this command without closing all browser windows first, your whole Java program will end while leaving the browser window open. Ā© Sun Technologies Inc. 48
49.
Common Commands in
Webdriver ā¢ Instantiating Web Elements ļWebElement myElement=driver.findElement(By.id(āname_3_firstnameā)); myElement.sendKeys(āHarryā); ļ§ Instead of using the long "driver.findElement(By.locator())" syntax every time you will access a particular element, we can instantiate a WebElement object for it. The WebElement class is contained in the "org.openqa.selenium.*" package. ā¢ Clicking on an Element ļdriver.findElement(By.className(āwpcf7-form-control wpcf7- submitā)).click(); ļ§ The click() method is used to simulate the clicking of any element. ļ§ It does not take any parameter/argument. ļ§ The method automatically waits for a new page to load if applicable. ļ§ The element to be clicked-on, must be visible (height and width must not be equal to zero). Ā© Sun Technologies Inc. 49
50.
Navigate commands in
Webdriver navigate().to() ā¢It automatically opens a new browser window and fetches the page that you specify inside its parentheses. ā¢It does exactly the same thing as the get() method. navigate().refresh() ā¢Needs no parameters. ā¢It refreshes the current page. navigate().back() ā¢Needs no parameters ā¢Takes you back by one page on the browser's history. navigate().forward() ā¢Needs no parameters ā¢Takes you forward by one page on the browser's history. Ā© Sun Technologies Inc. 50
51.
Switching Between Frames
in Webdriver ā¢ To access GUI elements in a Frame, we should first direct WebDriver to focus on the frame or pop-up window first, before we can access elements within them. ā¢ In order to do that, we must first instruct WebDriver to switch to the "classFrame" frame using the "switchTo().frame()" method. ā¢ We will use the name attribute of the frame as the parameter for the "frame()" part. ā¢ WebDriver allows pop-up windows like alerts to be displayed. ā¢ To access the elements within the alert (such as the message it contains), we must use the "switchTo().alert()" method. ā¢ In the code below, we will use this method to access the alert box and then retrieve its message using the "getText()"method, and then automatically close the alert box using the "switchTo().alert().accept()" method. Ā© Sun Technologies Inc. 51
52.
Waits in Selenium
Webdriver ā¢ There are two kinds of waits. ā¢ Implicit wait - used to set the default waiting time throughout the program. ā¢ Explicit wait - used to set the waiting time for a particular instance only. ā¢ Implicit Wait ļIt is simpler to code than Explicit Waits. ļIt is usually declared in the instantiation part of the code. ļWe will only need one additional package to import. ļTo start using an implicit wait, we would have to import this package: ļimport java.util.concurrent.TimeUnit; ļOn the instantiation part of your code, add this. ļ Ā© Sun Technologies Inc. 52
53.
ā¢ Explicit Wait ļExplicit
waits are done using the WebDriverWait and ExpectedCondition classes. ļFor the following example, we shall wait up to 10 seconds for an element whose id is āusername " to become visible before proceeding to the next command. ļSteps to write an Explicit wait in Selenium Webdriver: ļ±Step 1 -> Import these 2 packages. ļ§ import org.openqa.selenium.support.ui.ExpectedConditions; ļ§ import org.openqa.selenium.support.ui.WebDriverWait; ļ±Step 2 -> Declare a WebDriverWait variable. In this example, we will use "myWaitVar" as the name of the variable. Ā© Sun Technologies Inc. 53
54.
Methods used in
conditional and looping operations ā¢ isEnabled() is used when you want to verify whether a certain element is enabled or not before executing a command. ā¢ isDisplayed() is used when you want to verify whether a certain element is displayed or not before executing a command. Ā© Sun Technologies Inc. 54
55.
ā¢ isSelected() is
used when you want to verify whether a certain check box, radio button, or option in a drop-down box is selected. It does not work on other elements. Ā© Sun Technologies Inc. 55
56.
Keyboard Mouse Events Ā©
Sun Technologies Inc. 56 Method Description clickAndHold() Clicks (without releasing) at the current mouse location. contextClick() Performs a context-click at the current mouse location. doubleClick() Performs a double-click at the current mouse location. dragAndDrop(source, target) Performs click-and-hold at the location of the source element, moves to the location of the target element, then releases the mouse. Parameters: source- element to emulate button down at. target- element to move to and release the mouse at. dragAndDropBy(source, x-offset, y-offset) Performs click-and-hold at the location of the source element, moves by a given offset, then releases the mouse. Parameters: source- element to emulate button down at. xOffset- horizontal move offset. yOffset- vertical move offset.
57.
keyDown(modifier_key) Performs a
modifier key press. Does not release the modifier key - subsequent interactions may assume it's kept pressed. Parameters: modifier_key - any of the modifier keys (Keys.ALT, Keys.SHIFT, or Keys.CONTROL) keyUp(modifier _key) Performs a key release. Parameters: modifier_key - any of the modifier keys (Keys.ALT, Keys.SHIFT, or Keys.CONTROL) moveByOffset(x-offset, y-offset) Moves the mouse from its current position (or 0,0) by the given offset. Parameters: x-offset- horizontal offset. A negative value means moving the mouse left. y-offset- vertical offset. A negative value means moving the mouse up. Ā© Sun Technologies Inc. 57
58.
Ā© Sun Technologies
Inc. 58 moveToElement(toElement) Moves the mouse to the middle of the element. Parameters: toElement- element to move to. release() Releases the depressed left mouse button at the current mouse location sendKeys(onElement, charsequence) Sends a series of keystrokes onto the element. Parameters: onElement - element that will receive the keystrokes, usually a text field charsequence - any string value representing the sequence of keystrokes to be sent
59.
Action Class ā¢ Action
Class in Selenium is used to handle keyboard and mouse events. ā¢ Following steps to be performed while using Action class. ļStep 1: Import the Actions and Action classes. ā¢ Step 2: Instantiate a new Actions object. ā¢ Step 3: Instantiate an Action using the Actions object in step 2. ā¢ Step 4: Use the perform() method when executing the Action object we designed in Step 3. Ā© Sun Technologies Inc. 59
60.
Uploading Files ā¢ Remember
following two things when uploading files in WebDriver ā¢ There is no need to simulate the clicking of the "Browse" button. WebDriver automatically enters the file path onto the file-selection text box of the <input type="file"> element ā¢ When setting the file path in your Java IDE, use the proper escape character for the back-slash. Ā© Sun Technologies Inc. 60
61.
Frameworks ā¢ A framework
defines a set of guidelines/best practices that enforces a standard which makes it easy to use for the end users to work. ā¢ There are 4 types of Framework. They are: ļ¼Keyword-Driven Framework. ļ¼Data-Driven Framework. ļ¼Hybrid Framework. ļ¼POM Framework. Ā© Sun Technologies Inc. 61
62.
Keyword-Driven Framework ā¢ Keyword
Driven Framework is a type of Functional Automation Testing Framework which is also known as Table-Driven testing or Action Word based testing. ā¢ Keyword nothing but a code which represent some action, say āloginā. in this framework, we map the set of code which perform certain action with a keyword and then we use that keyword across the framework. ā¢ Keyword Driven Framework can be done and maintained with the help of Excel spread sheet: ā¢ Test Step: It is a very small description of the Test Step or the description of the Action going to perform onTest Object. ā¢ Test Object: It is the name of the Web Page object/element, like Username & Password. ā¢ Action: It is the name of the action, which is going to perform on any Object such as click, open browser, input etc. ā¢ Test Data: Data can be any value which is needed by the Object to perform any action, like Username value for Username field. Ā© Sun Technologies Inc. 62
63.
Data-Driven Framework ā¢ When
some test needs to repeat for different data set , Data driven framework gets used. ā¢ In this framework, Parameters in the test case gets linked to database, excel, csv, text files from there test case run for all defined parameter in the file. ā¢ We will use the data excelāsrc/test/resources/testData/default.xlsxā file and the file looks as below. Ā© Sun Technologies Inc. 63
64.
Hybrid Framework ā¢ Combination
of Keyword Driven Framework and Data Driven Framework. Ā© Sun Technologies Inc. 64
65.
POM Framework ā¢ Page
Object model is writing all the functionalities / reusable components of a page that we want to automate in a separate class. ā¢ The main advantage of Page Object Model is that if the UI changes for any page, it donāt require us to change any tests, we just need to change only the code within the page objects (Only at one place). ā¢ Advantages: ļ§ There is clean separation between test code and page specific code such as locators (or their use if youāre using a UI map) and layout. ļ§ There is single repository for the services or operations offered by the page rather than having these services scattered through out the tests. Ā© Sun Technologies Inc. 65
66.
Pros ā¢ Low Cost
Tool ā¢ Browser Compatibility Testing ā¢ Choice of Language ā¢ Scripts can be saved and re-run at any time ā¢ Multiple Testing Frameworks ā¢ It is quite popular for quick-cycle development methodologies such as Agile or Extreme Programming ā¢ Test Driven Development ā¢ Useful for Comprehensive Testing Ā© Sun Technologies Inc. 66
67.
Cons ā¢ It doesnāt
support windows based applications ā¢ Despite its acceptance of other test script languages, it demands higher- level technical skills, such as programming, from QA team members. ā¢ It requires third-party frameworks, language bindings and so on to be truly effective. ā¢ Captcha image text canāt be automatable.(we need to request developers to give separate build to execute captcha image text verification) Ā© Sun Technologies Inc. 67
Download now