SlideShare a Scribd company logo
SELENIUM AUTOMATION
SELENIUM IS AN OPEN-SOURCE TOOL THAT IS USED FOR TEST
AUTOMATION. IT IS LICENSED UNDER APACHE LICENSE 2.0. SELENIUM IS A
SUITE OF TOOLS THAT HELPS IN AUTOMATING WEB APPLICATIONS.
PRATYUSH MAJUMDAR
ASSOCIATE PROJECT MANAGER
PREREQUISITES
Before proceeding with this tutorial, you should have
• a basic understanding of Java or any other object-oriented programming language
• you should be well-versed with the fundamentals of testing concepts.
OVERVIEW
• Selenium IDE - Selenium Integrated Development Environment (IDE) is a Firefox plugin that lets testers
to record and play their actions.
• Selenium RC - Selenium Remote Control (RC) makes use of the full power of programming languages
such as Java, C#, PHP, Python, Ruby and PERL to create more complex tests.
• Selenium WebDriver - Selenium WebDriver is the successor to Selenium RC which sends commands
directly to the browser and retrieves results.
• Selenium Grid - Selenium Grid is a tool used to run parallel tests across different machines and different
browsers simultaneously which results in minimized execution time.
ENVIRONMENT SETUP
• Download and Install JDK (7 or 8)
• Download and Install Eclipse (Latest Version)
• Install Firebug in Mozilla to capture x-path
• Download Selenium Jars
• Additional required Jars [TestNG, ReportNG, Apache POI etc]
WEBDRIVER
• WebDriver is a tool for automating testing web applications.
• It is popularly known as Selenium 2.0.
• WebDriver interacts directly with the browser without any intermediary, unlike Selenium RC that
depends on a server.
• Locating elements in Selenium WebDriver is performed with the help of findElement() and
findElements() methods provided by WebDriver and WebElement class.
• driver.findElement(By.id(<element ID>))
• driver.findElement(By.name(<element name>))
• driver.findElement(By.linkText(<linktext>))
• driver.findElement(By.xpath(<xpath>))
USER INTERACTIONS
• Text Box Interaction [Inputs using sendKeys()]
• Radio Button Selection [Selection using click()]
• Check Box Selection [Selection using click()]
• Drop Down Item Selection ['selectByVisibleText' or 'selectByIndex' or 'selectByValue']
• Synchronization
• Thread.Sleep [Sleep the running Thread]
• Explicit Waits [It is mainly used when we want to click or act on an object once it is visible.]
• Implicit Wait [Will wait for a hardcoded vale of time]
• Drag & Drop [clickAndHold]
• Keyboard Actions [pressKey, releaseKey]
• Mouse Actions [click, doubleClick, mouseMove]
• Multi Select
• Find All Links
TESTING FRAMEWORK
• Module Based Testing
• Keyword Driven Testing [all the operations and instructions are written in Excel, CSV etc.]
• Data Driven Testing [Form Field Validation, test data is read from Excel, CSV etc.]
• Hybrid Testing [Keyword and Data driven combined]
• Multi Browser
• TestNG
• ReportNG
THANK YOU
QUESTIONS ?
TESTNG
• TestNG is a powerful testing framework, an enhanced version of JUnit. NG stands for 'Next Generation'.
• Annotations help us organize the tests easily (@Test, @BeforeXXX and @AfterXXX).
• Flexible test configuration (using @Parameters, @Listeners).
• Support for data-driven testing (with @DataProvider).
• Parallelization of tests can be achieved using TestNG.
• testng.xml (Test Suits, Groups)
• Inbuilt reporting (HTML Reports).
• A test is considered successful if it completed without throwing any exception or if it threw an exception that
was expected.
• A test method will typically be made of calls that can throw an exception, or of various assertions (using the
Java "assert" keyword). An "assert" failing will trigger an AssertionErrorException, which in turn will mark the
method as failed.
Back
Selenium Automation
Selenium Automation
Selenium Automation
Selenium Automation

More Related Content

What's hot

SoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPluginsSoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPlugins
SmartBear
 
Unit Testing in WordPress
Unit Testing in WordPressUnit Testing in WordPress
Unit Testing in WordPress
Barry Kooij
 
Functional Testing
Functional TestingFunctional Testing
Functional Testing
Adam Hill
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...seleniumconf
 
Selenium
SeleniumSelenium
Selenium
Ruturaj Doshi
 
React Native: The Development Flow
React Native: The Development FlowReact Native: The Development Flow
React Native: The Development Flow
Ritesh Kumar
 
Selenium tutorials
Selenium tutorialsSelenium tutorials
Selenium tutorials
Ducat
 
Automating testing with open source tools (1)
Automating testing with open source tools (1)Automating testing with open source tools (1)
Automating testing with open source tools (1)
Rohit Biradar
 
Custom control in asp.net
Custom control in asp.netCustom control in asp.net
Custom control in asp.net
Sireesh K
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
Dinesh Kaushik
 
QSpiders - Selenium Webdriver
QSpiders - Selenium WebdriverQSpiders - Selenium Webdriver
QSpiders - Selenium Webdriver
Qspiders - Software Testing Training Institute
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsNick Belhomme
 
The current state of web
The current state of webThe current state of web
The current state of web
Ritesh Kumar
 
Selenium 101 Webinar
Selenium 101 WebinarSelenium 101 Webinar
Selenium 101 Webinar
Daniel Herken
 
Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5
Felicia O'Garro
 
Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016
Steinn 'Stan' Jónsson
 

What's hot (19)

SoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPluginsSoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPlugins
 
Unit Testing in WordPress
Unit Testing in WordPressUnit Testing in WordPress
Unit Testing in WordPress
 
Functional Testing
Functional TestingFunctional Testing
Functional Testing
 
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
Testing Rapidly Changing Applications With Self-Testing Object-Oriented Selen...
 
Selenium
SeleniumSelenium
Selenium
 
React Native: The Development Flow
React Native: The Development FlowReact Native: The Development Flow
React Native: The Development Flow
 
Selenium tutorials
Selenium tutorialsSelenium tutorials
Selenium tutorials
 
Automating testing with open source tools (1)
Automating testing with open source tools (1)Automating testing with open source tools (1)
Automating testing with open source tools (1)
 
Custom control in asp.net
Custom control in asp.netCustom control in asp.net
Custom control in asp.net
 
Agile Tools
Agile ToolsAgile Tools
Agile Tools
 
Part1 my
Part1 myPart1 my
Part1 my
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
 
QSpiders - Selenium Webdriver
QSpiders - Selenium WebdriverQSpiders - Selenium Webdriver
QSpiders - Selenium Webdriver
 
QAorHighway2016
QAorHighway2016QAorHighway2016
QAorHighway2016
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
 
The current state of web
The current state of webThe current state of web
The current state of web
 
Selenium 101 Webinar
Selenium 101 WebinarSelenium 101 Webinar
Selenium 101 Webinar
 
Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5Intro to Electron - Creating Desktop Applications with HTML5
Intro to Electron - Creating Desktop Applications with HTML5
 
Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016Testing Web Services - QA or the Highway 2016
Testing Web Services - QA or the Highway 2016
 

Similar to Selenium Automation

Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaEr. Sndp Srda
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
Zeba Tahseen
 
Selenium
SeleniumSelenium
Selenium
Satyam Pandey
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
Amr E. Mohamed
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
orbitprojects
 
Selenium (1) (1)
Selenium (1) (1)Selenium (1) (1)
Selenium (1) (1)
Vishwan Aranha
 
Selenium
SeleniumSelenium
Selenium
Batch2016
 
Selenium
SeleniumSelenium
Selenium
SeleniumSelenium
Selenium
Batch2016
 
Selenium
SeleniumSelenium
Selenium
Ivan Aranha
 
Selenium
SeleniumSelenium
Selenium
Batch2016
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using Java
F K
 
TestCafe Meetup Malmberg
TestCafe Meetup MalmbergTestCafe Meetup Malmberg
TestCafe Meetup Malmberg
Joost van Dieten
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorialprad_123
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
Slobodan Lohja
 
Selenium
SeleniumSelenium
Selenium
eduquer
 
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2 Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
Thecreating Experts
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
AbdulImrankhan7
 
Selenium Introduction
Selenium IntroductionSelenium Introduction
Selenium Introduction
Mayur Khairnar
 

Similar to Selenium Automation (20)

Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Selenium
SeleniumSelenium
Selenium
 
Selenium - Introduction
Selenium - IntroductionSelenium - Introduction
Selenium - Introduction
 
Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Selenium (1) (1)
Selenium (1) (1)Selenium (1) (1)
Selenium (1) (1)
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using Java
 
TestCafe Meetup Malmberg
TestCafe Meetup MalmbergTestCafe Meetup Malmberg
TestCafe Meetup Malmberg
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorial
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Selenium
SeleniumSelenium
Selenium
 
Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2 Selenium Training in Chennai Demo Part-2
Selenium Training in Chennai Demo Part-2
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Selenium Introduction
Selenium IntroductionSelenium Introduction
Selenium Introduction
 

More from Pratyush Majumdar

System Design Basics by Pratyush Majumdar
System Design Basics by Pratyush MajumdarSystem Design Basics by Pratyush Majumdar
System Design Basics by Pratyush Majumdar
Pratyush Majumdar
 
Advance MySQL Training by Pratyush Majumdar
Advance MySQL Training by Pratyush MajumdarAdvance MySQL Training by Pratyush Majumdar
Advance MySQL Training by Pratyush Majumdar
Pratyush Majumdar
 
An Introduction to Pagespeed Optimisation
An Introduction to Pagespeed OptimisationAn Introduction to Pagespeed Optimisation
An Introduction to Pagespeed Optimisation
Pratyush Majumdar
 
Aws Architecture Training
Aws Architecture TrainingAws Architecture Training
Aws Architecture Training
Pratyush Majumdar
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
Pratyush Majumdar
 
CrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsCrUx Report and Improving Web vitals
CrUx Report and Improving Web vitals
Pratyush Majumdar
 
Making app cluster ready
Making app cluster readyMaking app cluster ready
Making app cluster ready
Pratyush Majumdar
 
SEI CMMI presentation
SEI CMMI presentationSEI CMMI presentation
SEI CMMI presentation
Pratyush Majumdar
 
Apache architecture
Apache architectureApache architecture
Apache architecture
Pratyush Majumdar
 

More from Pratyush Majumdar (9)

System Design Basics by Pratyush Majumdar
System Design Basics by Pratyush MajumdarSystem Design Basics by Pratyush Majumdar
System Design Basics by Pratyush Majumdar
 
Advance MySQL Training by Pratyush Majumdar
Advance MySQL Training by Pratyush MajumdarAdvance MySQL Training by Pratyush Majumdar
Advance MySQL Training by Pratyush Majumdar
 
An Introduction to Pagespeed Optimisation
An Introduction to Pagespeed OptimisationAn Introduction to Pagespeed Optimisation
An Introduction to Pagespeed Optimisation
 
Aws Architecture Training
Aws Architecture TrainingAws Architecture Training
Aws Architecture Training
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
CrUx Report and Improving Web vitals
CrUx Report and Improving Web vitalsCrUx Report and Improving Web vitals
CrUx Report and Improving Web vitals
 
Making app cluster ready
Making app cluster readyMaking app cluster ready
Making app cluster ready
 
SEI CMMI presentation
SEI CMMI presentationSEI CMMI presentation
SEI CMMI presentation
 
Apache architecture
Apache architectureApache architecture
Apache architecture
 

Recently uploaded

Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
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
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 

Recently uploaded (20)

Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
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
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 

Selenium Automation

  • 1. SELENIUM AUTOMATION SELENIUM IS AN OPEN-SOURCE TOOL THAT IS USED FOR TEST AUTOMATION. IT IS LICENSED UNDER APACHE LICENSE 2.0. SELENIUM IS A SUITE OF TOOLS THAT HELPS IN AUTOMATING WEB APPLICATIONS. PRATYUSH MAJUMDAR ASSOCIATE PROJECT MANAGER
  • 2. PREREQUISITES Before proceeding with this tutorial, you should have • a basic understanding of Java or any other object-oriented programming language • you should be well-versed with the fundamentals of testing concepts.
  • 3. OVERVIEW • Selenium IDE - Selenium Integrated Development Environment (IDE) is a Firefox plugin that lets testers to record and play their actions. • Selenium RC - Selenium Remote Control (RC) makes use of the full power of programming languages such as Java, C#, PHP, Python, Ruby and PERL to create more complex tests. • Selenium WebDriver - Selenium WebDriver is the successor to Selenium RC which sends commands directly to the browser and retrieves results. • Selenium Grid - Selenium Grid is a tool used to run parallel tests across different machines and different browsers simultaneously which results in minimized execution time.
  • 4. ENVIRONMENT SETUP • Download and Install JDK (7 or 8) • Download and Install Eclipse (Latest Version) • Install Firebug in Mozilla to capture x-path • Download Selenium Jars • Additional required Jars [TestNG, ReportNG, Apache POI etc]
  • 5. WEBDRIVER • WebDriver is a tool for automating testing web applications. • It is popularly known as Selenium 2.0. • WebDriver interacts directly with the browser without any intermediary, unlike Selenium RC that depends on a server. • Locating elements in Selenium WebDriver is performed with the help of findElement() and findElements() methods provided by WebDriver and WebElement class. • driver.findElement(By.id(<element ID>)) • driver.findElement(By.name(<element name>)) • driver.findElement(By.linkText(<linktext>)) • driver.findElement(By.xpath(<xpath>))
  • 6. USER INTERACTIONS • Text Box Interaction [Inputs using sendKeys()] • Radio Button Selection [Selection using click()] • Check Box Selection [Selection using click()] • Drop Down Item Selection ['selectByVisibleText' or 'selectByIndex' or 'selectByValue'] • Synchronization • Thread.Sleep [Sleep the running Thread] • Explicit Waits [It is mainly used when we want to click or act on an object once it is visible.] • Implicit Wait [Will wait for a hardcoded vale of time] • Drag & Drop [clickAndHold] • Keyboard Actions [pressKey, releaseKey] • Mouse Actions [click, doubleClick, mouseMove] • Multi Select • Find All Links
  • 7. TESTING FRAMEWORK • Module Based Testing • Keyword Driven Testing [all the operations and instructions are written in Excel, CSV etc.] • Data Driven Testing [Form Field Validation, test data is read from Excel, CSV etc.] • Hybrid Testing [Keyword and Data driven combined] • Multi Browser • TestNG • ReportNG
  • 9. TESTNG • TestNG is a powerful testing framework, an enhanced version of JUnit. NG stands for 'Next Generation'. • Annotations help us organize the tests easily (@Test, @BeforeXXX and @AfterXXX). • Flexible test configuration (using @Parameters, @Listeners). • Support for data-driven testing (with @DataProvider). • Parallelization of tests can be achieved using TestNG. • testng.xml (Test Suits, Groups) • Inbuilt reporting (HTML Reports). • A test is considered successful if it completed without throwing any exception or if it threw an exception that was expected. • A test method will typically be made of calls that can throw an exception, or of various assertions (using the Java "assert" keyword). An "assert" failing will trigger an AssertionErrorException, which in turn will mark the method as failed. Back