SlideShare a Scribd company logo
By Creating Experts
Contact us-8122241286
http://thecreatingexperts.com/selenium-training-
in-chennai/
Introduction to WebDriver & Comparison with
Selenium RC
What is WebDriver?
WebDriver is a web automation framework that allows you to execute your tests against
different browsers, not just Firefox (unlike Selenium IDE).
• WebDriver also enables you to use a programming language in creating your test scripts (not
possible in Selenium IDE).
• You can now use conditional operations like if-then-else or switch-case
• You can also perform looping like do-while.
Following programming languages are supported by WebDriver
• Java
• .Net
• PHP
• Python
• Perl
• Ruby
• You do not have to know all of them. You just need to be knowledgeable in one. However, in
this tutorial, we will be using Java with Eclipse as our IDE
WebDriver Vs Selenium RC
• Before the advent of WebDriver in 2006, there was another, automation tool called Selenium
Remote Control. Both WebDriver and Selenium RC have following features:
• They both allow you to use a programming language in designing your test scripts.
• They both allow you to run your tests against different browsers.
Guide to install Selenium WebDriver
Step 1 - Install Java on your computer
• Download and install the Java Software Development Kit (JDK)
• This JDK version comes bundled with Java Runtime Environment (JRE) so you do not need
to download and install the JRE separately.
Step 2 - Install Eclipse IDE
• Download "Eclipse IDE for Java Developers" here. Be sure to choose correctly between
Windows 32 Bit and 64 Bit versions.
Step 3 - Download the Selenium Java Client Driver
• You can download the Selenium Java Client Driver here. You will find client drivers for other
languages there, but only choose the one for Java.
• Step 4 - Configure Eclipse IDE with WebDriver
• Launch the "eclipse.exe" file inside the "eclipse" folder that we extracted in step 2. If you
followed step 2 correctly, the executable should be located on C:eclipseeclipse.exe.
• When asked to select for a workspace, just accept the default location.
• Create a new project through File > New > Java Project. Name the project as "newproject".
A new pop-up window will open enter details as follow
• Project Name
• Location to save project
• Select an execution JRE
• Select layout project option
• Click on finish button
4. In this step,
• Right-click on the newly created project and
• Select New > Package, and name that package as "newpackage".
A pop-up window will open to name the package,
• Enter the name of the package
• Click on finish button
5. Create a new Java class under newpackage by right-clicking on it and then selecting- New >
Class, and then name it as "MyClass". Your Eclipse IDE should look like the image below.
6. Add all the JAR files inside and outside the "libs" folder. Your Properties dialog should now
look similar to the image below.
7. Finally, click OK and we are done importing Selenium libraries into our project.
Creating your First Script in Webdriver
Using the Java class "myclass" that we created in the
previous tutorial, let us try to create a WebDriver script that
would.
• fetch Mercury Tours' homepage
• verify its title
• print out the result of the comparison
• close it before ending the entire program.
Accessing Forms using Selenium WebDriver
Accessing Form Elements
• Input Box
Input boxes refer to either of these two types:
Text Fields- text boxes that accept typed values and show them as they are.
Password Fields- text boxes that accept typed values but mask them as a series of special
characters (commonly dots and asterisks) to avoid sensitive values to be displayed.
Accessing Links & Tables using Selenium Webdriver
Accessing Links
Links Matching a Criterion
• Links can be accessed using an exact or partial match of their link text. The examples below
provide scenarios where multiple matches would exist, and would explain how WebDriver
would deal with them.
Exact Match
• Accessing links using their exact link text is done through the By.linkText() method. However,
if there are two links that have the very same link text, this method will only access the first
one. Consider the HTML code below
Partial Match
• Accessing links using a portion of their link text is done using the By.partialLinkText() method.
If you specify a partial link text that has multiple matches, only the first match will be
accessed. Consider the HTML code below.
Keyboard Mouse Events , Uploading Files -
Webdriver
Handling Keyboard & Mouse Events
Handling special keyboard and mouse events are done using the Advanced User
Interactions API. It contains the Actions and the Action classes that are needed when executing
these events.
In the following example, we shall use the moveToElement() method to mouse-over on one
Mercury Tours' table rows.
Step 1
• Import the Actions and Action classes.
• Keyboard Mouse Events , Uploading Files - Webdriver
Step 2
• Instantiate a new Actions object.
• Keyboard Mouse Events , Uploading Files - Webdriver
Step 3
Instantiate an Action using the Actions object in step 2.
Keyboard Mouse Events , Uploading Files - Webdriver
In this case, we are going to use the moveToElement() method because we are simply going to
mouse-over the "Home" link. The build() method is always the final method used so that all the
listed actions will be compiled into a single step.
Step 4
• Use the perform() method when executing the Action object we designed in Step 3.
Conclusion
• In this presentation, I have giv en the introduction of
webdriver and explained about comparison of selenium
RC.
• Further topics will be expain in nest presentation.
• If you are interested to join in the training reach us-
8122241286
• Visit us-http://thecreatingexperts.com/selenium-training-
in-chennai/

More Related Content

What's hot (19)

PPTX
An overview of selenium webdriver
Anuraj S.L
 
PDF
[React Native Tutorial] Lecture 6: Component, Props, and Network
Kobkrit Viriyayudhakorn
 
PPT
ASP.NET Session 5
Sisir Ghosh
 
PPTX
Test automation
Kaushik Banerjee
 
PPTX
How to create your own WordPress plugin
John Tighe
 
PPTX
Step by step - Selenium 3 web-driver - From Scratch
Haitham Refaat
 
ODP
Mongo db rev001.
Rich Helton
 
PDF
Understanding Facebook's React.js
Federico Torre
 
PDF
Selenium web driver
Shobika Ramasubbarayalu
 
PPTX
How to Configure Selenium WebDriver (java)
Dasun Eranthika
 
PDF
JOSA TechTalks - RESTful API Concepts and Best Practices
Jordan Open Source Association
 
PDF
[React Native Tutorial] Lecture 5: Input and State
Kobkrit Viriyayudhakorn
 
PPTX
Java
manavp
 
PPTX
Introduction to Selenium WebDriver
SpringPeople
 
PDF
Page Object Model and Implementation in Selenium
Zoe Gilbert
 
PPT
AspMVC4 start101
Rich Helton
 
PPTX
React js
Nikhil Karkra
 
PPT
ASP.NET Session 6
Sisir Ghosh
 
PPTX
Selenium web driver
Roman Savitskiy
 
An overview of selenium webdriver
Anuraj S.L
 
[React Native Tutorial] Lecture 6: Component, Props, and Network
Kobkrit Viriyayudhakorn
 
ASP.NET Session 5
Sisir Ghosh
 
Test automation
Kaushik Banerjee
 
How to create your own WordPress plugin
John Tighe
 
Step by step - Selenium 3 web-driver - From Scratch
Haitham Refaat
 
Mongo db rev001.
Rich Helton
 
Understanding Facebook's React.js
Federico Torre
 
Selenium web driver
Shobika Ramasubbarayalu
 
How to Configure Selenium WebDriver (java)
Dasun Eranthika
 
JOSA TechTalks - RESTful API Concepts and Best Practices
Jordan Open Source Association
 
[React Native Tutorial] Lecture 5: Input and State
Kobkrit Viriyayudhakorn
 
Java
manavp
 
Introduction to Selenium WebDriver
SpringPeople
 
Page Object Model and Implementation in Selenium
Zoe Gilbert
 
AspMVC4 start101
Rich Helton
 
React js
Nikhil Karkra
 
ASP.NET Session 6
Sisir Ghosh
 
Selenium web driver
Roman Savitskiy
 

Viewers also liked (9)

PDF
Scuff20160025
Yolanda Zhang
 
PPT
Webinar Loles Sancho en Lowpost -Marketing de contenidos-
Lowpost_contenidos
 
PDF
Masterthesis Milan Nieweg
Milan Nieweg
 
PDF
Novos palestrantes confirmados para o 3º congresso internacional de complianc...
Editora Roncarati
 
DOCX
lavado de dinero
J0H4NN4
 
PDF
Estado actual de los avances normativos hacia los edificios de consumo casi n...
MARATUM Marketing A Tu Medida
 
PDF
Intelligence Bureau Previous Interview Question Papers
4JobOpenings
 
PDF
MODERN AUTOMOTIVE TECHNOLOGY
Vivek Kamal
 
PDF
Consulta pública sobre la directiva de eficiencia energética en edificios
MARATUM Marketing A Tu Medida
 
Scuff20160025
Yolanda Zhang
 
Webinar Loles Sancho en Lowpost -Marketing de contenidos-
Lowpost_contenidos
 
Masterthesis Milan Nieweg
Milan Nieweg
 
Novos palestrantes confirmados para o 3º congresso internacional de complianc...
Editora Roncarati
 
lavado de dinero
J0H4NN4
 
Estado actual de los avances normativos hacia los edificios de consumo casi n...
MARATUM Marketing A Tu Medida
 
Intelligence Bureau Previous Interview Question Papers
4JobOpenings
 
MODERN AUTOMOTIVE TECHNOLOGY
Vivek Kamal
 
Consulta pública sobre la directiva de eficiencia energética en edificios
MARATUM Marketing A Tu Medida
 
Ad

Similar to Selenium Training in Chennai Demo Part-2 (20)

PDF
Creating selenium remote control tests
Dang Nguyen
 
DOCX
Selenium WebDriver FAQ's
Praveen Gorantla
 
PPTX
Selenium Training in Chennai
Thecreating Experts
 
PDF
Selenium with testng and eclipse ide
Testertester Jaipur
 
PPT
Steps to write Selenium
Rohit Thakur
 
PPTX
Selenium training
Shivaraj R
 
PPTX
Selenium.pptx
orbitprojects
 
DOCX
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Rashedul Islam
 
PPTX
Selenium Testing
Shreshtt Bhatt
 
PPT
ASP.net web api Power Point Presentation
BefastMeetingMinutes
 
PDF
Eclipse IDE, 2019.09, Java Development
Pei-Hsuan Hsieh
 
PPTX
Servlet Demo (2).pptx
BalasundaramSr
 
PDF
The way to set automation testing
Duy Tan Geek
 
PPTX
Selenium withnet
Vlad Maniak
 
PDF
Integrating Maven with Eclipse
Nikhil Bharati
 
PPTX
Make Mobile Apps Quickly
Gil Irizarry
 
PDF
Selenium training12 1
AmanCSE1
 
PDF
Selenium training-course-content
AmanCSE1
 
PDF
Selenium training12 1
AmanCSE1
 
Creating selenium remote control tests
Dang Nguyen
 
Selenium WebDriver FAQ's
Praveen Gorantla
 
Selenium Training in Chennai
Thecreating Experts
 
Selenium with testng and eclipse ide
Testertester Jaipur
 
Steps to write Selenium
Rohit Thakur
 
Selenium training
Shivaraj R
 
Selenium.pptx
orbitprojects
 
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Rashedul Islam
 
Selenium Testing
Shreshtt Bhatt
 
ASP.net web api Power Point Presentation
BefastMeetingMinutes
 
Eclipse IDE, 2019.09, Java Development
Pei-Hsuan Hsieh
 
Servlet Demo (2).pptx
BalasundaramSr
 
The way to set automation testing
Duy Tan Geek
 
Selenium withnet
Vlad Maniak
 
Integrating Maven with Eclipse
Nikhil Bharati
 
Make Mobile Apps Quickly
Gil Irizarry
 
Selenium training12 1
AmanCSE1
 
Selenium training-course-content
AmanCSE1
 
Selenium training12 1
AmanCSE1
 
Ad

More from Thecreating Experts (20)

PPT
Selenium training in chennai
Thecreating Experts
 
PPT
Selenium Training in Chennai
Thecreating Experts
 
PPT
Selenium training in chennai
Thecreating Experts
 
PPTX
SAP BASIS Training in Chennai Demo Part-7
Thecreating Experts
 
PPTX
SAP SD Training in Chennai Demo Part-4
Thecreating Experts
 
PPTX
SAP MM Training in Chennai Demo Part-5
Thecreating Experts
 
PPTX
SAP HR Training in Chennai Demo Part-4
Thecreating Experts
 
PPTX
SAP BASIS Training in Chennai Demo Part-6
Thecreating Experts
 
PPTX
SAP SD Training in Chennai Demo Part-3
Thecreating Experts
 
PPTX
SAP HR Training in Chennai Demo Part-3
Thecreating Experts
 
PPTX
SAP BASIS Training in Chennai Demo Part-5
Thecreating Experts
 
PPTX
SAP HR Training in Chennai Demo Part-1
Thecreating Experts
 
PPTX
SAP BASIS Training in Chennai Demo Part-4
Thecreating Experts
 
PPTX
SAP SD Training in Chennai Demo Part-2
Thecreating Experts
 
PPTX
SAP SD Training in Chennai
Thecreating Experts
 
PPTX
SAP MM Training in Chennai Demo Part-2
Thecreating Experts
 
PPTX
SAP BASIS Training in Chennai Demo Part-3
Thecreating Experts
 
PPTX
SAP MM Training in Chennai
Thecreating Experts
 
PPTX
SAP BASIS Training in Chennai
Thecreating Experts
 
PPTX
SAP BASIS Training in Chennai
Thecreating Experts
 
Selenium training in chennai
Thecreating Experts
 
Selenium Training in Chennai
Thecreating Experts
 
Selenium training in chennai
Thecreating Experts
 
SAP BASIS Training in Chennai Demo Part-7
Thecreating Experts
 
SAP SD Training in Chennai Demo Part-4
Thecreating Experts
 
SAP MM Training in Chennai Demo Part-5
Thecreating Experts
 
SAP HR Training in Chennai Demo Part-4
Thecreating Experts
 
SAP BASIS Training in Chennai Demo Part-6
Thecreating Experts
 
SAP SD Training in Chennai Demo Part-3
Thecreating Experts
 
SAP HR Training in Chennai Demo Part-3
Thecreating Experts
 
SAP BASIS Training in Chennai Demo Part-5
Thecreating Experts
 
SAP HR Training in Chennai Demo Part-1
Thecreating Experts
 
SAP BASIS Training in Chennai Demo Part-4
Thecreating Experts
 
SAP SD Training in Chennai Demo Part-2
Thecreating Experts
 
SAP SD Training in Chennai
Thecreating Experts
 
SAP MM Training in Chennai Demo Part-2
Thecreating Experts
 
SAP BASIS Training in Chennai Demo Part-3
Thecreating Experts
 
SAP MM Training in Chennai
Thecreating Experts
 
SAP BASIS Training in Chennai
Thecreating Experts
 
SAP BASIS Training in Chennai
Thecreating Experts
 

Recently uploaded (20)

PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Dimensions of Societal Planning in Commonism
StefanMz
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 

Selenium Training in Chennai Demo Part-2

  • 1. By Creating Experts Contact us-8122241286 http://thecreatingexperts.com/selenium-training- in-chennai/
  • 2. Introduction to WebDriver & Comparison with Selenium RC What is WebDriver? WebDriver is a web automation framework that allows you to execute your tests against different browsers, not just Firefox (unlike Selenium IDE). • WebDriver also enables you to use a programming language in creating your test scripts (not possible in Selenium IDE). • You can now use conditional operations like if-then-else or switch-case • You can also perform looping like do-while.
  • 3. Following programming languages are supported by WebDriver • Java • .Net • PHP • Python • Perl • Ruby • You do not have to know all of them. You just need to be knowledgeable in one. However, in this tutorial, we will be using Java with Eclipse as our IDE
  • 4. WebDriver Vs Selenium RC • Before the advent of WebDriver in 2006, there was another, automation tool called Selenium Remote Control. Both WebDriver and Selenium RC have following features: • They both allow you to use a programming language in designing your test scripts. • They both allow you to run your tests against different browsers.
  • 5. Guide to install Selenium WebDriver Step 1 - Install Java on your computer • Download and install the Java Software Development Kit (JDK) • This JDK version comes bundled with Java Runtime Environment (JRE) so you do not need to download and install the JRE separately. Step 2 - Install Eclipse IDE • Download "Eclipse IDE for Java Developers" here. Be sure to choose correctly between Windows 32 Bit and 64 Bit versions. Step 3 - Download the Selenium Java Client Driver • You can download the Selenium Java Client Driver here. You will find client drivers for other languages there, but only choose the one for Java.
  • 6. • Step 4 - Configure Eclipse IDE with WebDriver • Launch the "eclipse.exe" file inside the "eclipse" folder that we extracted in step 2. If you followed step 2 correctly, the executable should be located on C:eclipseeclipse.exe. • When asked to select for a workspace, just accept the default location. • Create a new project through File > New > Java Project. Name the project as "newproject". A new pop-up window will open enter details as follow • Project Name • Location to save project • Select an execution JRE • Select layout project option • Click on finish button
  • 7. 4. In this step, • Right-click on the newly created project and • Select New > Package, and name that package as "newpackage". A pop-up window will open to name the package, • Enter the name of the package • Click on finish button 5. Create a new Java class under newpackage by right-clicking on it and then selecting- New > Class, and then name it as "MyClass". Your Eclipse IDE should look like the image below. 6. Add all the JAR files inside and outside the "libs" folder. Your Properties dialog should now look similar to the image below. 7. Finally, click OK and we are done importing Selenium libraries into our project.
  • 8. Creating your First Script in Webdriver Using the Java class "myclass" that we created in the previous tutorial, let us try to create a WebDriver script that would. • fetch Mercury Tours' homepage • verify its title • print out the result of the comparison • close it before ending the entire program.
  • 9. Accessing Forms using Selenium WebDriver Accessing Form Elements • Input Box Input boxes refer to either of these two types: Text Fields- text boxes that accept typed values and show them as they are. Password Fields- text boxes that accept typed values but mask them as a series of special characters (commonly dots and asterisks) to avoid sensitive values to be displayed.
  • 10. Accessing Links & Tables using Selenium Webdriver Accessing Links Links Matching a Criterion • Links can be accessed using an exact or partial match of their link text. The examples below provide scenarios where multiple matches would exist, and would explain how WebDriver would deal with them. Exact Match • Accessing links using their exact link text is done through the By.linkText() method. However, if there are two links that have the very same link text, this method will only access the first one. Consider the HTML code below Partial Match • Accessing links using a portion of their link text is done using the By.partialLinkText() method. If you specify a partial link text that has multiple matches, only the first match will be accessed. Consider the HTML code below.
  • 11. Keyboard Mouse Events , Uploading Files - Webdriver Handling Keyboard & Mouse Events Handling special keyboard and mouse events are done using the Advanced User Interactions API. It contains the Actions and the Action classes that are needed when executing these events.
  • 12. In the following example, we shall use the moveToElement() method to mouse-over on one Mercury Tours' table rows. Step 1 • Import the Actions and Action classes. • Keyboard Mouse Events , Uploading Files - Webdriver Step 2 • Instantiate a new Actions object. • Keyboard Mouse Events , Uploading Files - Webdriver
  • 13. Step 3 Instantiate an Action using the Actions object in step 2. Keyboard Mouse Events , Uploading Files - Webdriver In this case, we are going to use the moveToElement() method because we are simply going to mouse-over the "Home" link. The build() method is always the final method used so that all the listed actions will be compiled into a single step. Step 4 • Use the perform() method when executing the Action object we designed in Step 3.
  • 14. Conclusion • In this presentation, I have giv en the introduction of webdriver and explained about comparison of selenium RC. • Further topics will be expain in nest presentation. • If you are interested to join in the training reach us- 8122241286 • Visit us-http://thecreatingexperts.com/selenium-training- in-chennai/