SlideShare a Scribd company logo
2
Most read
7
Most read
8
Most read
Web Automation using Selenium
Autor: Ana Sârbescu
Software Testing Community
in Macedonia
November 2015
Summary:
● Why QA automation?
● All kind of tools for automation!
● Automation Framework?
● Using Selenium for web automated testing
● …with examples.
Why should we automate?
● Lack of resources and too much to test.
● Higher level of confidence, higher coverage.
● Free your time for creative testing!
● Agile approach to testing
– Regression gets little time during a Sprint
– Continuous increase in what needs to be tested
What tool we can use?
● Payed vs Freeware
– You won’t get the money
for it! ☺
– But it would be much
easier if you would.
– Free tools are not so
easy to use.
– Though they might be
more powerful.
● Recording vs Scripting
– For recording you need
no programming skills.
– But the options are very
rigid.
– With programming skills
you can make the world
go round…automatically.
Oh way…it already does..
➢ Sometimes you don’t have free tools to do what you need (ex.
Multiple platforms/Compatibility testing)
Programming Skills?
● Basic! ^_^
● Depends on the tool
● Depends on the framework type (recording or
scripting)
● Depending on your application type
● Depending on your testing goal (unit testing,
functionality testing, security testing etc)
The. FRAMEWORK. !
● What does an automation framework mean?
– Specific language
– Continuous Integration
– Available Test Data
– BDD?
● Who needs to do it? Well…who can. ☺
● Why is it needed? Because TIME!
Selenium Webdriver.
● For WEB. “Selenium automates browsers. ”
● It interrogates and manipulates the HTML.
● Contains domain-specific language (Selenese).
● Works with all browsers and platforms.
● Can be run remotely on different devices, at the
same time.
● It integrates with so many tools.
● Works with most languages: Java, C#, Groovy, Perl,
PHP, Python and Ruby
How we write tests in Selenium?
● Using its main actions:
– Initiate the browser:
● WebDriver myBrowser = new FirefoxWebdriver;
– Navigate to URL:
● Java: myBrowser.get("http://www.google.com");
● C#: myBrowser.Url = "http://www.google.com";
– Find elements:
● WebElement myElement = browser.findElement(By.id
("coolestWidgetEvah"));
● List<WebElement> myList = browser.findElements(By.
className(“differentOptions"));
– Verify condition
● Ifs, Verify and Assertions.
Web automation using selenium.ppt
Web automation using selenium.ppt
Finding elements by
● ID:
– By.id(“cheese”);
● Class:
– By.class(“cheese”);
● Name:
– By.name(“cheese”);
● Tag Name:
– By.tagName(“cheese”);
● LinkText/partial link text:
– By.linkText(“cheese”);
● CSS:
– By.cssSelector(“#food span.dairy.aged”);
● XPath:
– By.xpath(“//input”);
Verify commands. And Waits.
Verify vs Assertion
● verifyTitle/assertTitle
● verifyTextPresent
● verifyElementPresent
Implicit Wait:
– WebElement myItem = (new WebDriverWait(driver, 10)) .until
(ExpectedConditions.presenceOfElementLocated(By.id("myItem")));
– wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));
Explicit Wait:
– driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Other useful commands
● Send Keys:
– element.sendKeys("Cheese!");
● Click Button:
– driver.findElement(By.id("submit")).click();
● Select options:
– List<WebElement> allOptions = select.findElements(By.
tagName("option"));
● Switch frames/pop-ups:
– driver.switchTo().frame("frameName");
– Alert alert = driver.switchTo().alert();
Organizing your tests
● Junit, TestNG, Testem, Telerik, Nightwatch,
NodeJS, SoapUI etc
● Test suits, test grouping, tagging
● Configuration for different platforms
Ta daaaaaa!!!
No questions, Thank you!

More Related Content

PPTX
Introduction to Selenium Web Driver
PPT
QSpiders - Automation using Selenium
PPTX
An overview of selenium webdriver
PPTX
Test automation using selenium
PPTX
Selenium test automation
PPT
Selenium Presentation at Engineering Colleges
PDF
Automation Testing using Selenium
PPTX
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Introduction to Selenium Web Driver
QSpiders - Automation using Selenium
An overview of selenium webdriver
Test automation using selenium
Selenium test automation
Selenium Presentation at Engineering Colleges
Automation Testing using Selenium
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...

What's hot (20)

PPTX
Test Automation and Selenium
PPTX
Automation Testing by Selenium Web Driver
PPTX
Cypress Automation
PPTX
Automation - web testing with selenium
PPT
Test automation process
PPT
Automated Web Testing Using Selenium
PDF
Playwright: A New Test Automation Framework for the Modern Web
ODP
Selenium ppt
PDF
Page Object Model and Implementation in Selenium
PPT
Selenium
PPTX
Python selenium
PPTX
TestNG with selenium
PPTX
Introduction to selenium
PDF
SELENIUM PPT.pdf
PPT
Selenium
PPT
Automation With A Tool Demo
PDF
Web application testing with Selenium
PPTX
Data driven Automation Framework with Selenium
PPTX
Automation Testing
PDF
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Test Automation and Selenium
Automation Testing by Selenium Web Driver
Cypress Automation
Automation - web testing with selenium
Test automation process
Automated Web Testing Using Selenium
Playwright: A New Test Automation Framework for the Modern Web
Selenium ppt
Page Object Model and Implementation in Selenium
Selenium
Python selenium
TestNG with selenium
Introduction to selenium
SELENIUM PPT.pdf
Selenium
Automation With A Tool Demo
Web application testing with Selenium
Data driven Automation Framework with Selenium
Automation Testing
Selenium Page Object Model Using Page Factory | Selenium Tutorial For Beginne...
Ad

Similar to Web automation using selenium.ppt (20)

PDF
An Overview of Selenium Grid and Its Benefits
PPTX
Learn SELENIUM at ASIT
PPTX
Selenium presentation
PDF
Pdx Se Intro To Se
PDF
Selenium Automation Testing - A Complete Guide.pdf
ODP
Integrating Selenium testing infrastructure into Scala Project
PDF
Selenium Automation Testing - A Complete Guide.pdf
PDF
Selenium Automation Testing - A Complete Guide
PDF
Selenium - The Way Of Success
PDF
Selenium course training institute ameerpet hyderabad – Best software trainin...
PDF
Selenium course training institute ameerpet hyderabad
PDF
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
PPT
Selenium
PPT
Intro Of Selenium
PDF
Selenium Testing The Complete Step-by-Step Tutorial.pdf
PPTX
Selenium web driver
PDF
How To Use Selenium Successfully (Java Edition)
PDF
How to use selenium successfully
PPTX
test-automation-selenium-160216124839.pptx
PPTX
Selenium-Automation-The-Definitive-Guide (1).pptx
An Overview of Selenium Grid and Its Benefits
Learn SELENIUM at ASIT
Selenium presentation
Pdx Se Intro To Se
Selenium Automation Testing - A Complete Guide.pdf
Integrating Selenium testing infrastructure into Scala Project
Selenium Automation Testing - A Complete Guide.pdf
Selenium Automation Testing - A Complete Guide
Selenium - The Way Of Success
Selenium course training institute ameerpet hyderabad – Best software trainin...
Selenium course training institute ameerpet hyderabad
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Selenium
Intro Of Selenium
Selenium Testing The Complete Step-by-Step Tutorial.pdf
Selenium web driver
How To Use Selenium Successfully (Java Edition)
How to use selenium successfully
test-automation-selenium-160216124839.pptx
Selenium-Automation-The-Definitive-Guide (1).pptx
Ad

Recently uploaded (20)

PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PDF
Jenkins: An open-source automation server powering CI/CD Automation
PDF
Convert Thunderbird to Outlook into bulk
PDF
Perfecting Gamer’s Experiences with Performance Testing for Gaming Applicatio...
PDF
Comprehensive Salesforce Implementation Services.pdf
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
Emergency Mustering solutions – A Brief overview
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
PPTX
Odoo Consulting Services by CandidRoot Solutions
PPTX
Services offered by Dynamic Solutions in Pakistan
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Build Multi-agent using Agent Development Kit
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
PPTX
How a Careem Clone App Allows You to Compete with Large Mobility Brands
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
PPTX
Presentation of Computer CLASS 2 .pptx
PPTX
Dynamic Solutions Project Pitch Presentation
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
Materi_Pemrograman_Komputer-Looping.pptx
Jenkins: An open-source automation server powering CI/CD Automation
Convert Thunderbird to Outlook into bulk
Perfecting Gamer’s Experiences with Performance Testing for Gaming Applicatio...
Comprehensive Salesforce Implementation Services.pdf
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Materi-Enum-and-Record-Data-Type (1).pptx
Emergency Mustering solutions – A Brief overview
A REACT POMODORO TIMER WEB APPLICATION.pdf
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
Odoo Consulting Services by CandidRoot Solutions
Services offered by Dynamic Solutions in Pakistan
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Build Multi-agent using Agent Development Kit
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
How a Careem Clone App Allows You to Compete with Large Mobility Brands
Micromaid: A simple Mermaid-like chart generator for Pharo
Presentation of Computer CLASS 2 .pptx
Dynamic Solutions Project Pitch Presentation

Web automation using selenium.ppt

  • 1. Web Automation using Selenium Autor: Ana Sârbescu Software Testing Community in Macedonia November 2015
  • 2. Summary: ● Why QA automation? ● All kind of tools for automation! ● Automation Framework? ● Using Selenium for web automated testing ● …with examples.
  • 3. Why should we automate? ● Lack of resources and too much to test. ● Higher level of confidence, higher coverage. ● Free your time for creative testing! ● Agile approach to testing – Regression gets little time during a Sprint – Continuous increase in what needs to be tested
  • 4. What tool we can use? ● Payed vs Freeware – You won’t get the money for it! ☺ – But it would be much easier if you would. – Free tools are not so easy to use. – Though they might be more powerful. ● Recording vs Scripting – For recording you need no programming skills. – But the options are very rigid. – With programming skills you can make the world go round…automatically. Oh way…it already does.. ➢ Sometimes you don’t have free tools to do what you need (ex. Multiple platforms/Compatibility testing)
  • 5. Programming Skills? ● Basic! ^_^ ● Depends on the tool ● Depends on the framework type (recording or scripting) ● Depending on your application type ● Depending on your testing goal (unit testing, functionality testing, security testing etc)
  • 6. The. FRAMEWORK. ! ● What does an automation framework mean? – Specific language – Continuous Integration – Available Test Data – BDD? ● Who needs to do it? Well…who can. ☺ ● Why is it needed? Because TIME!
  • 7. Selenium Webdriver. ● For WEB. “Selenium automates browsers. ” ● It interrogates and manipulates the HTML. ● Contains domain-specific language (Selenese). ● Works with all browsers and platforms. ● Can be run remotely on different devices, at the same time. ● It integrates with so many tools. ● Works with most languages: Java, C#, Groovy, Perl, PHP, Python and Ruby
  • 8. How we write tests in Selenium? ● Using its main actions: – Initiate the browser: ● WebDriver myBrowser = new FirefoxWebdriver; – Navigate to URL: ● Java: myBrowser.get("http://www.google.com"); ● C#: myBrowser.Url = "http://www.google.com"; – Find elements: ● WebElement myElement = browser.findElement(By.id ("coolestWidgetEvah")); ● List<WebElement> myList = browser.findElements(By. className(“differentOptions")); – Verify condition ● Ifs, Verify and Assertions.
  • 11. Finding elements by ● ID: – By.id(“cheese”); ● Class: – By.class(“cheese”); ● Name: – By.name(“cheese”); ● Tag Name: – By.tagName(“cheese”); ● LinkText/partial link text: – By.linkText(“cheese”); ● CSS: – By.cssSelector(“#food span.dairy.aged”); ● XPath: – By.xpath(“//input”);
  • 12. Verify commands. And Waits. Verify vs Assertion ● verifyTitle/assertTitle ● verifyTextPresent ● verifyElementPresent Implicit Wait: – WebElement myItem = (new WebDriverWait(driver, 10)) .until (ExpectedConditions.presenceOfElementLocated(By.id("myItem"))); – wait.until(ExpectedConditions.elementToBeClickable(By.id("someid"))); Explicit Wait: – driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
  • 13. Other useful commands ● Send Keys: – element.sendKeys("Cheese!"); ● Click Button: – driver.findElement(By.id("submit")).click(); ● Select options: – List<WebElement> allOptions = select.findElements(By. tagName("option")); ● Switch frames/pop-ups: – driver.switchTo().frame("frameName"); – Alert alert = driver.switchTo().alert();
  • 14. Organizing your tests ● Junit, TestNG, Testem, Telerik, Nightwatch, NodeJS, SoapUI etc ● Test suits, test grouping, tagging ● Configuration for different platforms