SlideShare una empresa de Scribd logo
1 de 28
Find me on LinkedIn - https://www.linkedin.com/in/upgundecha/ | Twitter @upgundecha
Unmesh Gundecha
Senior Architect, Test Engineering DveOps and
Developer Experience (DX)
CP-SAT SELENIUM SUMMIT 2021
Selenium
Power Tools
Quick Poll
Selenium is not a testing tool!
Selenium automates browsers. That's it!
What you do with that power is entirely up to you.
www.selenium.dev
Selenium Use Cases
• Create Macro for automating repetitive tasks in a Browser window
• Screen scrapping – e.g., find cheap hotels, flights…
• Personal productivity – Filling timesheets, checking status
• Stock trading (yeah!)
• Robotic Process Automation
• and most importantly testing or checking! (as in automated test execution tool)
The Selenium Iceberg
Selenium
HTML, CSS, XPath
JavaScript
Programming
Languages, OOAD, Design
Pattern, Clean Code
IDE, Version control
tool
xUnit, BDD
Framework,
Assertional Libraries
(Testing)
Orchestration Tool
(RPA)
Reporting tool
(Testing)
Build and CI Tools
(Maven, Gradle,
Jenkins)
Utilities
(Power Tools)
Selenium Stacks
Selenium Client Library
Programming Language
Macros & Input Data
As a Browser automation Macro
Selenium Client Library
Programming Language
Testing Framework
Reporting & Logging
Test Cases & Test Data
As a Testing Tool
Selenium Client Library
Programming Language
Orchestration Tool
Audit & Logging
Workflows & Event Data
As a RPA Tool
Frequently asked questions
• Does Selenium support Windows or Java Applications, Mainframes?
• Can we automate APIs with Selenium?
• How to test PDFs with Selenium?
• How to automate downloading browser drivers?
• How to take element screenshots?
• How to compare images in Selenium?
• How to check text on a image using Selenium?
• How to generate test data for Selenium tests?
• How to remove flakiness of tests due to application dependencies?
• and many more...
Stacks with Power Tools
Selenium Client Library
Programming Language
Macros & Input Data
Power tools (Utilities)
As a Browser automation Macro
Selenium Client Library
Programming Language
Testing Framework
Reporting & Logging
Test Cases & Test Data
Power tools (Utilities)
As a Testing Tool
Selenium Client Library
Programming Language
Orchestration Tool
Audit & Logging
Workflows & Event Data
Power tools (Utilities)
As a RPA Tool
Selenium Client Library
Programming Language
Macros & Input Data
In order to support such requirements, you can combine Selenium with other libraries (Power tools)
Orchestration Tool
Everything that we discuss in this session is Open
Source, no commercial or protected freeware stuff!
#respect #open-source
Six Power Tools
WebDriverManager ShutterBug Tesseract
Faker & Friends WireMock PDFBox
WebDriverManager
• WebDriverManager is a library which allows to automate the management of the
drivers (e.g. chromedriver, geckodriver, etc.) required by Selenium WebDriver
• Once configured WebDriverManager will automatically download configured
browser drivers for your tests
• Use as a dependency, command line tool, server, docker container…
• Find out the browser version
• Download the driver version
compatible with the browser version
• Set system property in test with the
location of binary
WebDriverManager – How to use it?
• Add WebDriverManager dependency
• Select the browser which you need,
that’s it! WebDriverManager will do
the magic for you
@Before
public void setup() {
System.setProperty("webdriver.chrome.driver",
"/Users/upgundecha/Downloads");
driver = new ChromeDriver();
}
@Before
public void setup() {
WebDriverManager.chromedriver().setup();
driver = new ChromeDriver();
}
ShutterBug
• Selenium Shutterbug is a utility library written in Java for making screenshots
using Selenium WebDriver and further customizing, comparing and processing
them with the help of Java AWT
• Selenium Screenshots on steroids
ShutterBug – Use Cases
• Capturing the entire page, WebElement, entire scrollable WebElement, frame
• Creating thumbnails
• Screenshot customizations:
• Highlighting element on the page, with added text
• Blur WebElement on the page (e.g. sensitive information)
• Blur whole page
• Blur whole page except specific WebElement
• Monochrome WebElement
• Crop around specific WebElement with offsets
• Screenshot comparison (with diff highlighting)
ShutterBug– How to use it?
// capture entire page
Shutterbug.shootPage(driver, Capture.FULL, true).save();
// blur and annotate
Shutterbug.shootPage(driver)
.blur(searchBox)
.monochrome(storeLogo)
.highlightWithText(storeLogo, Color.blue, 3, "Monochromed logo", Color.blue, new
Font("SansSerif", Font.BOLD, 20))
.highlightWithText(searchBox, "Blurred secret words")
.withTitle("Store home page - " + new Date())
.withName("home_page")
.withThumbnail(0.7).save();
// image comparison
String baselineFilePath = new File("src/test/resources/baseline_img/first_promo_banner.png")
.getAbsolutePath();
Assert.assertTrue(Shutterbug
.shootElement(driver, firstPromoBanner)
.equalsWithDiff(baselineFilePath,"diff",0.1));
Tesseract
• Tesseract OCR is an optical character reading engine originally developed by HP
in 1985 and open sourced in 2005. Since 2006 it is developed by Google.
Tesseract has Unicode (UTF-8) support and can recognize over 100 languages
“out of the box”
• Useful for capturing text from images, barcodes etc.
• Use with caution!
Tesseract – How to use it?
WebElement promoBanner = driver.findElement(By
.cssSelector("ul.promos> li:nth-child(1) > a"));
BufferedImage bannerImg = Shutterbug.shootElement(driver, promoBanner).getImage();
Tesseract tesseract = new Tesseract();
tesseract.setDatapath("/usr/local/Cellar/tesseract/4.1.1/share/tessdata/");
tesseract.setLanguage("eng");
String result = tesseract.doOCR(bannerImg).trim();
Assert.assertEquals("HOME & DECORnFOR ALL YOUR SPACES", result);
Faker & Friends
• Faker & friends are set of libraries available in various programming languages to
generate fake data for development and testing
• Faker can help in generating test data on the fly instead of manually finding data
every time before you run a test
• Faker libraries can generate data for over 100 data domains such as Names,
Addresses, Emails etc. in various locales.
• Faker can be extended to support custom data domains
more…
Faker & Friends – How to use it?
Faker faker = new Faker();
String firstName = faker.name().firstName();
String lastName = faker.name().lastName();
String email = faker.internet().emailAddress();
String password = "P@ssword";
String greetings = String.format("Hello, %s %s!", firstName, lastName);
WireMock
• Wiremock helps in mocking HTTP services. You can stub HTTP responses in
JSON/XML for development and testing
• Also known as test doubles or service virtualization
• Wiremock can be used as a library in your Selenium projects or as standalone
instance
• There are bunch of other alternative available. Check out my awesome-toolbox
page
WireMock – How to use it?
// Setup and start the Wiremock server
WireMockServer wireMockServer = new WireMockServer(options()
.port(4000)
.notifier(new ConsoleNotifier(true)));
wireMockServer.start();
// Define stub for the test
wireMockServer
.stubFor(get(urlEqualTo("/data/2.5/weather?q=Singapore&appid
=undefined&units=metric"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type",
"application/json")
.withBodyFile("json/weather_data.json")));
PDFBox
• The Apache PDFBox library is an open-source Java tool for working with PDF
documents.
• PDFBox allows creation of new PDF documents, manipulation of existing
documents and the ability to extract content from documents
• Similar libraries available in other programming languages
• PDFBox can help you testing PDFs
• Use with caution!
PDFBox – How to use it?
doc = PDDocument.load(file);
Assert.assertEquals(1, doc.getNumberOfPages());
String content = new PDFTextStripper().getText(doc);
Assert.assertTrue(content.contains("PDF Test File"));
Demos!
Examples for this session are written in Java and JUnit
Most of these tools have alternate versions available in
other popular programming languages (Python, C#,
Ruby, JavaScript)
Resources
• Code from this session - https://github.com/upgundecha/se-powertools-recipes
• Awesome Toolbox - https://github.com/upgundecha/awesome-toolbox
• Awesome Selenium List - https://github.com/christian-bromann/awesome-
selenium
How to create your Power Toolbox
• Keep looking for libraries & tools in
• GitHub Explore
• Package Repositories such as npmjs.org, PyPI (Python Package Index),
rubygems.org
• Create awesome list in your GitHub Repo
My Books & Blog
https://www.amazon.com/~/e/B00ATKDJOA
Thank you!

Más contenido relacionado

La actualidad más candente

4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API TestingQASource
 
Java. Explicit and Implicit Wait. Testing Ajax Applications
Java. Explicit and Implicit Wait. Testing Ajax ApplicationsJava. Explicit and Implicit Wait. Testing Ajax Applications
Java. Explicit and Implicit Wait. Testing Ajax ApplicationsМарія Русин
 
Cross-Browser-Testing with Protractor & Browserstack
Cross-Browser-Testing with Protractor & BrowserstackCross-Browser-Testing with Protractor & Browserstack
Cross-Browser-Testing with Protractor & BrowserstackLeo Lindhorst
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in AngularKnoldus Inc.
 
Mock Server Using WireMock
Mock Server Using WireMockMock Server Using WireMock
Mock Server Using WireMockGlobant
 
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio
 
Webdriver io presentation
Webdriver io presentationWebdriver io presentation
Webdriver io presentationJoão Nabais
 
WCAG 2.0 for Designers
WCAG 2.0 for DesignersWCAG 2.0 for Designers
WCAG 2.0 for DesignersBrunner
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation ArchitectureErdem YILDIRIM
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Knoldus Inc.
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.pptAna Sarbescu
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerApplitools
 

La actualidad más candente (20)

React native
React nativeReact native
React native
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API Testing
 
Agile Testing by Example
Agile Testing by ExampleAgile Testing by Example
Agile Testing by Example
 
Java. Explicit and Implicit Wait. Testing Ajax Applications
Java. Explicit and Implicit Wait. Testing Ajax ApplicationsJava. Explicit and Implicit Wait. Testing Ajax Applications
Java. Explicit and Implicit Wait. Testing Ajax Applications
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Cross-Browser-Testing with Protractor & Browserstack
Cross-Browser-Testing with Protractor & BrowserstackCross-Browser-Testing with Protractor & Browserstack
Cross-Browser-Testing with Protractor & Browserstack
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in Angular
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
 
Mock Server Using WireMock
Mock Server Using WireMockMock Server Using WireMock
Mock Server Using WireMock
 
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and Developers
 
Webdriver io presentation
Webdriver io presentationWebdriver io presentation
Webdriver io presentation
 
Test Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and CucumberTest Automation Framework with BDD and Cucumber
Test Automation Framework with BDD and Cucumber
 
WCAG 2.0 for Designers
WCAG 2.0 for DesignersWCAG 2.0 for Designers
WCAG 2.0 for Designers
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
GUI Testing
GUI TestingGUI Testing
GUI Testing
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.ppt
 
API testing - Japura.pptx
API testing - Japura.pptxAPI testing - Japura.pptx
API testing - Japura.pptx
 
Introducing Playwright's New Test Runner
Introducing Playwright's New Test RunnerIntroducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
 

Similar a Session on Selenium Powertools by Unmesh Gundecha

Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application developmentzonathen
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullySpringPeople
 
Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationSauce Labs
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsMark Rackley
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptdavejohnson
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Roy de Kleijn
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Ondřej Machulda
 
Developing Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDeveloping Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDmitry Vinnik
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moiblemarkuskobler
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsSalesforce Developers
 
An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web ComponentsRed Pill Now
 

Similar a Session on Selenium Powertools by Unmesh Gundecha (20)

Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
 
SharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentialsSharePoint Cincy 2012 - jQuery essentials
SharePoint Cincy 2012 - jQuery essentials
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
 
Knolx session
Knolx sessionKnolx session
Knolx session
 
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016Improving Your Selenium WebDriver Tests - Belgium testing days_2016
Improving Your Selenium WebDriver Tests - Belgium testing days_2016
 
Selenium
SeleniumSelenium
Selenium
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
Developing Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDeveloping Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptx
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
 
Selenium
SeleniumSelenium
Selenium
 
Selenium
SeleniumSelenium
Selenium
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
 
Protractor overview
Protractor overviewProtractor overview
Protractor overview
 
An Introduction to Web Components
An Introduction to Web ComponentsAn Introduction to Web Components
An Introduction to Web Components
 
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
 

Más de Agile Testing Alliance

#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...Agile Testing Alliance
 
#Interactive Session by Ajay Balamurugadas, "Where Are The Real Testers In T...
#Interactive Session by  Ajay Balamurugadas, "Where Are The Real Testers In T...#Interactive Session by  Ajay Balamurugadas, "Where Are The Real Testers In T...
#Interactive Session by Ajay Balamurugadas, "Where Are The Real Testers In T...Agile Testing Alliance
 
#Interactive Session by Jishnu Nambiar and Mayur Ovhal, "Monitoring Web Per...
#Interactive Session by  Jishnu Nambiar and  Mayur Ovhal, "Monitoring Web Per...#Interactive Session by  Jishnu Nambiar and  Mayur Ovhal, "Monitoring Web Per...
#Interactive Session by Jishnu Nambiar and Mayur Ovhal, "Monitoring Web Per...Agile Testing Alliance
 
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...Agile Testing Alliance
 
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...Agile Testing Alliance
 
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.Agile Testing Alliance
 
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...Agile Testing Alliance
 
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...Agile Testing Alliance
 
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...Agile Testing Alliance
 
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...Agile Testing Alliance
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...Agile Testing Alliance
 
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...Agile Testing Alliance
 
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...Agile Testing Alliance
 
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...Agile Testing Alliance
 
#Interactive Session by Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
#Interactive Session by  Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...#Interactive Session by  Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
#Interactive Session by Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...Agile Testing Alliance
 
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...Agile Testing Alliance
 
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.Agile Testing Alliance
 
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...Agile Testing Alliance
 
#Interactive Session by Aniket Diwakar Kadukar and Padimiti Vaidik Eswar Dat...
#Interactive Session by Aniket Diwakar Kadukar and  Padimiti Vaidik Eswar Dat...#Interactive Session by Aniket Diwakar Kadukar and  Padimiti Vaidik Eswar Dat...
#Interactive Session by Aniket Diwakar Kadukar and Padimiti Vaidik Eswar Dat...Agile Testing Alliance
 
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...Agile Testing Alliance
 

Más de Agile Testing Alliance (20)

#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
#Interactive Session by Anindita Rath and Mahathee Dandibhotla, "From Good to...
 
#Interactive Session by Ajay Balamurugadas, "Where Are The Real Testers In T...
#Interactive Session by  Ajay Balamurugadas, "Where Are The Real Testers In T...#Interactive Session by  Ajay Balamurugadas, "Where Are The Real Testers In T...
#Interactive Session by Ajay Balamurugadas, "Where Are The Real Testers In T...
 
#Interactive Session by Jishnu Nambiar and Mayur Ovhal, "Monitoring Web Per...
#Interactive Session by  Jishnu Nambiar and  Mayur Ovhal, "Monitoring Web Per...#Interactive Session by  Jishnu Nambiar and  Mayur Ovhal, "Monitoring Web Per...
#Interactive Session by Jishnu Nambiar and Mayur Ovhal, "Monitoring Web Per...
 
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
#Interactive Session by Pradipta Biswas and Sucheta Saurabh Chitale, "Navigat...
 
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
#Interactive Session by Apoorva Ram, "The Art of Storytelling for Testers" at...
 
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
#Interactive Session by Nikhil Jain, "Catch All Mail With Graph" at #ATAGTR2023.
 
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
#Interactive Session by Ashok Kumar S, "Test Data the key to robust test cove...
 
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
#Interactive Session by Seema Kohli, "Test Leadership in the Era of Artificia...
 
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
#Interactive Session by Ashwini Lalit, RRR of Test Automation Maintenance" at...
 
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
#Interactive Session by Srithanga Aishvarya T, "Machine Learning Model to aut...
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
 
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
#Interactive Session by Sudhir Upadhyay and Ashish Kumar, "Strengthening Test...
 
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
#Interactive Session by Sayan Deb Kundu, "Testing Gen AI Applications" at #AT...
 
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
#Interactive Session by Dinesh Boravke, "Zero Defects – Myth or Reality" at #...
 
#Interactive Session by Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
#Interactive Session by  Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...#Interactive Session by  Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
#Interactive Session by Saby Saurabh Bhardwaj, "Redefine Quality Assurance –...
 
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
#Keynote Session by Sanjay Kumar, "Innovation Inspired Testing!!" at #ATAGTR2...
 
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
#Keynote Session by Schalk Cronje, "Don’t Containerize me" at #ATAGTR2023.
 
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
#Interactive Session by Chidambaram Vetrivel and Venkatesh Belde, "Revolution...
 
#Interactive Session by Aniket Diwakar Kadukar and Padimiti Vaidik Eswar Dat...
#Interactive Session by Aniket Diwakar Kadukar and  Padimiti Vaidik Eswar Dat...#Interactive Session by Aniket Diwakar Kadukar and  Padimiti Vaidik Eswar Dat...
#Interactive Session by Aniket Diwakar Kadukar and Padimiti Vaidik Eswar Dat...
 
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
#Interactive Session by Vivek Patle and Jahnavi Umarji, "Empowering Functiona...
 

Último

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 

Último (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

Session on Selenium Powertools by Unmesh Gundecha

  • 1. Find me on LinkedIn - https://www.linkedin.com/in/upgundecha/ | Twitter @upgundecha Unmesh Gundecha Senior Architect, Test Engineering DveOps and Developer Experience (DX) CP-SAT SELENIUM SUMMIT 2021 Selenium Power Tools
  • 3. Selenium is not a testing tool! Selenium automates browsers. That's it! What you do with that power is entirely up to you. www.selenium.dev
  • 4. Selenium Use Cases • Create Macro for automating repetitive tasks in a Browser window • Screen scrapping – e.g., find cheap hotels, flights… • Personal productivity – Filling timesheets, checking status • Stock trading (yeah!) • Robotic Process Automation • and most importantly testing or checking! (as in automated test execution tool)
  • 5. The Selenium Iceberg Selenium HTML, CSS, XPath JavaScript Programming Languages, OOAD, Design Pattern, Clean Code IDE, Version control tool xUnit, BDD Framework, Assertional Libraries (Testing) Orchestration Tool (RPA) Reporting tool (Testing) Build and CI Tools (Maven, Gradle, Jenkins) Utilities (Power Tools)
  • 6. Selenium Stacks Selenium Client Library Programming Language Macros & Input Data As a Browser automation Macro Selenium Client Library Programming Language Testing Framework Reporting & Logging Test Cases & Test Data As a Testing Tool Selenium Client Library Programming Language Orchestration Tool Audit & Logging Workflows & Event Data As a RPA Tool
  • 7. Frequently asked questions • Does Selenium support Windows or Java Applications, Mainframes? • Can we automate APIs with Selenium? • How to test PDFs with Selenium? • How to automate downloading browser drivers? • How to take element screenshots? • How to compare images in Selenium? • How to check text on a image using Selenium? • How to generate test data for Selenium tests? • How to remove flakiness of tests due to application dependencies? • and many more...
  • 8. Stacks with Power Tools Selenium Client Library Programming Language Macros & Input Data Power tools (Utilities) As a Browser automation Macro Selenium Client Library Programming Language Testing Framework Reporting & Logging Test Cases & Test Data Power tools (Utilities) As a Testing Tool Selenium Client Library Programming Language Orchestration Tool Audit & Logging Workflows & Event Data Power tools (Utilities) As a RPA Tool Selenium Client Library Programming Language Macros & Input Data In order to support such requirements, you can combine Selenium with other libraries (Power tools) Orchestration Tool
  • 9. Everything that we discuss in this session is Open Source, no commercial or protected freeware stuff! #respect #open-source
  • 10. Six Power Tools WebDriverManager ShutterBug Tesseract Faker & Friends WireMock PDFBox
  • 11. WebDriverManager • WebDriverManager is a library which allows to automate the management of the drivers (e.g. chromedriver, geckodriver, etc.) required by Selenium WebDriver • Once configured WebDriverManager will automatically download configured browser drivers for your tests • Use as a dependency, command line tool, server, docker container…
  • 12. • Find out the browser version • Download the driver version compatible with the browser version • Set system property in test with the location of binary WebDriverManager – How to use it? • Add WebDriverManager dependency • Select the browser which you need, that’s it! WebDriverManager will do the magic for you @Before public void setup() { System.setProperty("webdriver.chrome.driver", "/Users/upgundecha/Downloads"); driver = new ChromeDriver(); } @Before public void setup() { WebDriverManager.chromedriver().setup(); driver = new ChromeDriver(); }
  • 13. ShutterBug • Selenium Shutterbug is a utility library written in Java for making screenshots using Selenium WebDriver and further customizing, comparing and processing them with the help of Java AWT • Selenium Screenshots on steroids
  • 14. ShutterBug – Use Cases • Capturing the entire page, WebElement, entire scrollable WebElement, frame • Creating thumbnails • Screenshot customizations: • Highlighting element on the page, with added text • Blur WebElement on the page (e.g. sensitive information) • Blur whole page • Blur whole page except specific WebElement • Monochrome WebElement • Crop around specific WebElement with offsets • Screenshot comparison (with diff highlighting)
  • 15. ShutterBug– How to use it? // capture entire page Shutterbug.shootPage(driver, Capture.FULL, true).save(); // blur and annotate Shutterbug.shootPage(driver) .blur(searchBox) .monochrome(storeLogo) .highlightWithText(storeLogo, Color.blue, 3, "Monochromed logo", Color.blue, new Font("SansSerif", Font.BOLD, 20)) .highlightWithText(searchBox, "Blurred secret words") .withTitle("Store home page - " + new Date()) .withName("home_page") .withThumbnail(0.7).save(); // image comparison String baselineFilePath = new File("src/test/resources/baseline_img/first_promo_banner.png") .getAbsolutePath(); Assert.assertTrue(Shutterbug .shootElement(driver, firstPromoBanner) .equalsWithDiff(baselineFilePath,"diff",0.1));
  • 16. Tesseract • Tesseract OCR is an optical character reading engine originally developed by HP in 1985 and open sourced in 2005. Since 2006 it is developed by Google. Tesseract has Unicode (UTF-8) support and can recognize over 100 languages “out of the box” • Useful for capturing text from images, barcodes etc. • Use with caution!
  • 17. Tesseract – How to use it? WebElement promoBanner = driver.findElement(By .cssSelector("ul.promos> li:nth-child(1) > a")); BufferedImage bannerImg = Shutterbug.shootElement(driver, promoBanner).getImage(); Tesseract tesseract = new Tesseract(); tesseract.setDatapath("/usr/local/Cellar/tesseract/4.1.1/share/tessdata/"); tesseract.setLanguage("eng"); String result = tesseract.doOCR(bannerImg).trim(); Assert.assertEquals("HOME & DECORnFOR ALL YOUR SPACES", result);
  • 18. Faker & Friends • Faker & friends are set of libraries available in various programming languages to generate fake data for development and testing • Faker can help in generating test data on the fly instead of manually finding data every time before you run a test • Faker libraries can generate data for over 100 data domains such as Names, Addresses, Emails etc. in various locales. • Faker can be extended to support custom data domains more…
  • 19. Faker & Friends – How to use it? Faker faker = new Faker(); String firstName = faker.name().firstName(); String lastName = faker.name().lastName(); String email = faker.internet().emailAddress(); String password = "P@ssword"; String greetings = String.format("Hello, %s %s!", firstName, lastName);
  • 20. WireMock • Wiremock helps in mocking HTTP services. You can stub HTTP responses in JSON/XML for development and testing • Also known as test doubles or service virtualization • Wiremock can be used as a library in your Selenium projects or as standalone instance • There are bunch of other alternative available. Check out my awesome-toolbox page
  • 21. WireMock – How to use it? // Setup and start the Wiremock server WireMockServer wireMockServer = new WireMockServer(options() .port(4000) .notifier(new ConsoleNotifier(true))); wireMockServer.start(); // Define stub for the test wireMockServer .stubFor(get(urlEqualTo("/data/2.5/weather?q=Singapore&appid =undefined&units=metric")) .willReturn(aResponse() .withStatus(200) .withHeader("Content-Type", "application/json") .withBodyFile("json/weather_data.json")));
  • 22. PDFBox • The Apache PDFBox library is an open-source Java tool for working with PDF documents. • PDFBox allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents • Similar libraries available in other programming languages • PDFBox can help you testing PDFs • Use with caution!
  • 23. PDFBox – How to use it? doc = PDDocument.load(file); Assert.assertEquals(1, doc.getNumberOfPages()); String content = new PDFTextStripper().getText(doc); Assert.assertTrue(content.contains("PDF Test File"));
  • 24. Demos! Examples for this session are written in Java and JUnit Most of these tools have alternate versions available in other popular programming languages (Python, C#, Ruby, JavaScript)
  • 25. Resources • Code from this session - https://github.com/upgundecha/se-powertools-recipes • Awesome Toolbox - https://github.com/upgundecha/awesome-toolbox • Awesome Selenium List - https://github.com/christian-bromann/awesome- selenium
  • 26. How to create your Power Toolbox • Keep looking for libraries & tools in • GitHub Explore • Package Repositories such as npmjs.org, PyPI (Python Package Index), rubygems.org • Create awesome list in your GitHub Repo
  • 27. My Books & Blog https://www.amazon.com/~/e/B00ATKDJOA