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)

PPTX
Cell Structure & Organelles in detailed.
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Institutional Correction lecture only . . .
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
RMMM.pdf make it easy to upload and study
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Cell Structure & Organelles in detailed.
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
human mycosis Human fungal infections are called human mycosis..pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Final Presentation General Medicine 03-08-2024.pptx
O7-L3 Supply Chain Operations - ICLT Program
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Complications of Minimal Access Surgery at WLH
Institutional Correction lecture only . . .
01-Introduction-to-Information-Management.pdf
PPH.pptx obstetrics and gynecology in nursing
Abdominal Access Techniques with Prof. Dr. R K Mishra
RMMM.pdf make it easy to upload and study
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pre independence Education in Inndia.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.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; }