SlideShare a Scribd company logo
Selenium WebDriver
By
Arti Tripathi & Amit Agarwal
Agenda
• What is Selenium Grid?
• What is Selenium Hub and Node?
• Setting up Selenium Grid 2 using multiple VMs.
– Configuring Grid 2 using webconfig.txt JSON format
configuration file.
– Running Grid 2 console in browser.
– Update setup method of BaseTestSetup.java file.
– Update TestNG.xml file.
• Run test scripts on multiple VMs using Grid 2.
What is Selenium Grid?
• Selenium-Grid allows you run your tests on
different machines against different browsers
in parallel. That is, running multiple tests at
the same time against different machines
running different browsers and operating
systems. Essentially, Selenium-Grid support
distributed test execution. It allows for
running your tests in a distributed test
execution environment.
What is Selenium Hub and Node?
• Hub – Implies selenium grid 2 hub which
distributes tests among multiple nodes
registered to it at runtime.
• Node – One node represents one machine
where test will be running & we can have
multiple nodes those will be registered with
one centralized hub which will be running on
anyone machine.
Setting up Selenium Grid 2 using
multiple VMs.
• Download latest version of selenium-server-
standalone-x.x.x.jar.
• Create JSON configuration file.
• Copying both ‘selenium-server-standalone-
x.x.x.jar’ and ‘webconfig.txt’ on number of
machines/VMs required for testing.
• Run Hub and Nodes.
Configuring Grid 2 using webconfig.txt
JSON format configuration file.
• browsersName & maxInstances
• port
• host
• hubPort
• hubHost
Running Grid 2 console in browser.
• Open the browser, Enter the following URL:-
http://put_hub_machine_name:4444/grid/co
nsole
(Note: - Don’t forget to enter the
“hub_machine_name” in above URL)
Update setup method of BaseTestSetup.java file
Update TestNG.xml file.
Run test scripts on multiple VMs
using Grid 2
Queries and Parking lot
Thank You

More Related Content

PDF
Introduction to Selenium grid
PPTX
How to work with Selenium Grid: a quick walkthrough
PDF
Cross Browser Testing using Selenium GRID.pdf
PDF
How to use Selenium Grid for Multi-Browser Testing.pdf
PDF
Selenium_Grid
PDF
Cross Browser Testing using Selenium GRID
PDF
The Selenium Grid: Run Multiple Automated Tests in Parallel
PDF
Selenium grid workshop london 2016
Introduction to Selenium grid
How to work with Selenium Grid: a quick walkthrough
Cross Browser Testing using Selenium GRID.pdf
How to use Selenium Grid for Multi-Browser Testing.pdf
Selenium_Grid
Cross Browser Testing using Selenium GRID
The Selenium Grid: Run Multiple Automated Tests in Parallel
Selenium grid workshop london 2016

Similar to Selenium WebDriver- Training Material and QA (20)

PPTX
Get Started With Selenium 3 and Selenium 3 Grid
PDF
Meet the Selenium Grid
KEY
Selenium Grid
PDF
Selenium
PPTX
Cross platform browser automation tests sdp
PPT
Running Selenium tests on CI server
PPTX
Selenium 101 Webinar
PPTX
Scaling and Managing Selenium Grid
PPTX
Selenium And Its Types
PPTX
How to work with Selenium Grid and Cloud Solutions
PDF
Automation Testing using Selenium Webdriver
PDF
Introduction to selenium_grid_workshop
PPTX
SKILLWISE_SELENIUM
KEY
Getting started with Selenium 2
PPT
Selenium training in chennai
PPTX
Selenium-Grid-Extras
PDF
Manage Selenium Grid with Terraform by Omkar Khatavkar (https://www.linkedin....
ODP
Selenium ppt
PPTX
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
PDF
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Get Started With Selenium 3 and Selenium 3 Grid
Meet the Selenium Grid
Selenium Grid
Selenium
Cross platform browser automation tests sdp
Running Selenium tests on CI server
Selenium 101 Webinar
Scaling and Managing Selenium Grid
Selenium And Its Types
How to work with Selenium Grid and Cloud Solutions
Automation Testing using Selenium Webdriver
Introduction to selenium_grid_workshop
SKILLWISE_SELENIUM
Getting started with Selenium 2
Selenium training in chennai
Selenium-Grid-Extras
Manage Selenium Grid with Terraform by Omkar Khatavkar (https://www.linkedin....
Selenium ppt
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
Getting Started with Dockerization of Selenium Tests Execution - Testwarez 2019
Ad

Recently uploaded (20)

PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Cell Structure & Organelles in detailed.
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
GDM (1) (1).pptx small presentation for students
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Cell Structure & Organelles in detailed.
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Microbial diseases, their pathogenesis and prophylaxis
Supply Chain Operations Speaking Notes -ICLT Program
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
FourierSeries-QuestionsWithAnswers(Part-A).pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
VCE English Exam - Section C Student Revision Booklet
Final Presentation General Medicine 03-08-2024.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
GDM (1) (1).pptx small presentation for students
O7-L3 Supply Chain Operations - ICLT Program
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Ad

Selenium WebDriver- Training Material and QA

  • 2. Agenda • What is Selenium Grid? • What is Selenium Hub and Node? • Setting up Selenium Grid 2 using multiple VMs. – Configuring Grid 2 using webconfig.txt JSON format configuration file. – Running Grid 2 console in browser. – Update setup method of BaseTestSetup.java file. – Update TestNG.xml file. • Run test scripts on multiple VMs using Grid 2.
  • 3. What is Selenium Grid? • Selenium-Grid allows you run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, Selenium-Grid support distributed test execution. It allows for running your tests in a distributed test execution environment.
  • 4. What is Selenium Hub and Node? • Hub – Implies selenium grid 2 hub which distributes tests among multiple nodes registered to it at runtime. • Node – One node represents one machine where test will be running & we can have multiple nodes those will be registered with one centralized hub which will be running on anyone machine.
  • 5. Setting up Selenium Grid 2 using multiple VMs. • Download latest version of selenium-server- standalone-x.x.x.jar. • Create JSON configuration file. • Copying both ‘selenium-server-standalone- x.x.x.jar’ and ‘webconfig.txt’ on number of machines/VMs required for testing. • Run Hub and Nodes.
  • 6. Configuring Grid 2 using webconfig.txt JSON format configuration file. • browsersName & maxInstances • port • host • hubPort • hubHost
  • 7. Running Grid 2 console in browser. • Open the browser, Enter the following URL:- http://put_hub_machine_name:4444/grid/co nsole (Note: - Don’t forget to enter the “hub_machine_name” in above URL)
  • 8. Update setup method of BaseTestSetup.java file
  • 10. Run test scripts on multiple VMs using Grid 2

Editor's Notes

  • #7: Sample webconfig.txt:- { "capabilities": [ { "browserName": "firefox", "acceptSslCerts": true, "javascriptEnabled": true, "takeScreenshots": true, "firefox_profile": "", "maxInstances": 3, "seleniumProtocol": "WebDriver" }, { "browserName": "chrome", "maxInstances": 3, "seleniumProtocol": "WebDriver" }, { "platform": "WINDOWS", "browserName": "internet explorer", "maxInstances": 4, "seleniumProtocol": "WebDriver" } ], "configuration": { "cleanUpCycle": 2000, "timeout": 30000, "proxy": "org.openqa.grid.selenium.proxy.WebDriverRemoteProxy", "maxSession": 5, "port": 5555, "host": noiam003ag-w1, "register": true, "hubPort": 4444, "hubHost" : noiam003ag-w1 } }
  • #9: BaseTestSetup.java :- public WebDriver setup(String BROWSER) throws MalformedURLException{ System.out.println("Browser: " + BROWSER); if (BROWSER.equals("FF")) { System.out.println("FF is selected"); capability = DesiredCapabilities.firefox(); capability.setBrowserName("firefox"); capability.setPlatform(org.openqa.selenium.Platform.ANY); driver = new RemoteWebDriver(new URL("http://noiam003ag-w1:4444/wd/hub"), capability); driver.get(baseURL); } else if (BROWSER.equals("IE")) { System.out.println("IE is selected"); capability = DesiredCapabilities.internetExplorer(); capability.setBrowserName("internet explorer"); capability.setPlatform(org.openqa.selenium.Platform.WINDOWS); } else if (BROWSER.equals("CH")){ System.out.println("Google chrome is selected"); System.setProperty("webdriver.chrome.driver", "C:/ChromeDriver/chromedriver.exe"); capability = DesiredCapabilities.chrome(); capability.setBrowserName("chrome"); capability.setPlatform(org.openqa.selenium.Platform.WINDOWS); driver = new RemoteWebDriver(new URL("http://noiam003ag-w1:4444/wd/hub"), capability); driver.get(baseURL); } System.out.println("Remote Driver setup"); return driver; }