SlideShare a Scribd company logo
Daniel Herken
dherken@browseemall.com
http://www.browseemall.com
Get Started With Selenium 3
Selenium 3
Today we will cover
1. What is Selenium?
2. How to setup a testing environment
3. Running your first test
4. Working with Selenium Grid
5. Simplify with the BrowseEmAll Grid
6. Q/A Session
Introduction
Supported by all major browser vendors:
What is Selenium?
Free and open source browser automation framework.
What is Selenium?
How does it work?
Your Code
What is Selenium?
How does it work?
Your Code Selenium
What is Selenium?
How does it work?
Your Code Selenium
IEDriver
Edge
Driver
Firefox
Driver
Chrome
Driver
What is Selenium?
How does it work?
Your Code Selenium
IEDriver
Edge
Driver
Firefox
Driver
Chrome
Driver
Internet
Explorer
Microsoft
Edge
Firefox
Chrome
Supports automation of all major browsers:
What is Selenium?
Which browsers are supported?
Selenium language bindings are available for:
• Java
• C#
• Ruby
• Python
• JavaScript
• Perl (third-party)
• PHP (third-party)
What is Selenium?
Which programming languages are supported?
• Install Firefox: https://www.mozilla.org
• Install Google Chrome: https://www.google.com/chrome/browser/desktop/
• Add c:Selenium (or similar path on macOS / Linux) to your PATH
Setup Selenium
Requirements
o Internet Explorer Driver:
• Download (32bit or 64bit) http://www.seleniumhq.org/download/
• Extract to c:Selenium
o Edge Driver:
• Download https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
• Copy to c:Selenium
o Chrome Driver:
• Download https://sites.google.com/a/chromium.org/chromedriver/
• Copy to c:Selenium
o Firefox Driver:
• Download https://github.com/mozilla/geckodriver/releases
• Extract to c:Selenium
Setup Selenium
Installing Drivers
A Simple Test
Running a simple Google query
[TestMethod]
public void GoogleForSelenium()
{
// Launch new instance for Firefox
IWebDriver driver = new FirefoxDriver();
// Navigate to google
driver.Navigate().GoToUrl("http://www.google.com");
// Find the input field for the search query
IWebElement inputField = driver.FindElement(By.Name("q"));
// Add some text to the input field
inputField.SendKeys("Selenium");
// Submit the search
inputField.Submit();
// Google uses JS to render the results page so we need to wait
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
wait.Until(o => o.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase));
// Use asserts like you would in unit tests
Assert.IsTrue(driver.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase));
// close down the browser
driver.Quit();
}
A Simple Test
Demo
A Simple Test
[TestMethod]
public void GoogleForSelenium_Chrome()
{
IWebDriver driver = new ChromeDriver();
GoogleForSelenium(driver);
}
[TestMethod]
public void GoogleForSelenium_Edge()
{
IWebDriver driver = new EdgeDriver();
GoogleForSelenium(driver);
}
[TestMethod]
public void GoogleForSelenium_InternetExplorer()
{
IWebDriver driver = new InternetExplorerDriver();
GoogleForSelenium(driver);
}
public void GoogleForSelenium(IWebDriver driver)
{
// Navigate to google
driver.Navigate().GoToUrl("http://www.google.com");
A Simple Test
Demo
Selenium Grid can be used to run Selenium tests parallel and on multiple machines. This helps with:
• Reducing the overall time of test execution
• Running tests against browsers on different operating systems
Selenium Grid
What is Selenium Grid?
Selenium Grid
Your Code
Selenium Grid
How does it work?
Your Code
Remote
Driver
Selenium Grid
How does it work?
Your Code
Remote
Driver
Selenium
Hub
Selenium Grid
How does it work?
Your Code
Remote
Driver
Selenium
Hub
Selenium
Node
Selenium
Node
Selenium
Node
1. Download Java: https://www.java.com/en/download/
2. Download Selenium Standalone Server: http://www.seleniumhq.org/download/
• Copy to c:Selenium
3. Start the Hub with the command line:
• java -jar selenium-server-standalone-3.0.1.jar -role hub
4. Grid console available at: http://localhost:4444/grid/console
Selenium Grid
Setup a Hub
1. Create a node configuration file:
{ "capabilities": [{
"browserName": "firefox",
"platform": "WINDOWS",
"maxInstances": 1
}],
"maxSession": 5,
"port": 5555,
"register": true
}
2. Start the Node with the command line:
• java -jar selenium-server-standalone-3.0.1.jar -role node -hub
http://localhost:4444/grid/register -nodeConfig node.json
Selenium Grid
Setup a Node
Selenium Grid
[TestMethod]
public void GoogleForSeleniumOnGrid()
{
// Launch new instance for Firefox
IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.Firefox());
// Navigate to google
driver.Navigate().GoToUrl("http://www.google.com");
// Find the input field for the search query
IWebElement inputField = driver.FindElement(By.Name("q"));
// Add some text to the input field
inputField.SendKeys("Selenium");
// Submit the search
inputField.Submit();
// Google uses JS to render the results page so we need to wait
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
wait.Until(o => o.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase));
// Use asserts like you would in unit tests
Assert.IsTrue(driver.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase));
// close down the browser
driver.Quit();
}
Selenium Grid
Demo
BrowseEmAll Grid
BrowseEmAll Grid
[TestMethod]
public void GoogleForSeleniumOnGrid()
{
// Launch new instance for Firefox
IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.Firefox());
// Navigate to google
driver.Navigate().GoToUrl("http://www.google.com");
// Find the input field for the search query
IWebElement inputField = driver.FindElement(By.Name("q"));
// Add some text to the input field
inputField.SendKeys("Selenium");
// Submit the search
inputField.Submit();
// Google uses JS to render the results page so we need to wait
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
wait.Until(o => o.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase));
// Use asserts like you would in unit tests
Assert.IsTrue(driver.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase));
// close down the browser
driver.Quit();
}
BrowseEmAll Grid
Demo
Questions?
Q & A
Ad

More Related Content

What's hot (20)

Selenium with java
Selenium with javaSelenium with java
Selenium with java
Satyam Pandey
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Yuriy Gerasimov
 
QSpiders - Automation using Selenium
QSpiders - Automation using SeleniumQSpiders - Automation using Selenium
QSpiders - Automation using Selenium
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 tests
Nick Belhomme
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
Deepak Mittal
 
Selenium Webdriver
Selenium WebdriverSelenium Webdriver
Selenium Webdriver
Muhammad Bilal
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.ppt
Ana Sarbescu
 
Selenium IDE features
Selenium IDE featuresSelenium IDE features
Selenium IDE features
onewomanmore witl
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
Pankaj Dubey
 
Selenium
SeleniumSelenium
Selenium
Adam Goucher
 
Selenium Demo
Selenium DemoSelenium Demo
Selenium Demo
ankitslide
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
Naga Dinesh
 
Selenium (1)
Selenium (1)Selenium (1)
Selenium (1)
onlinemindq
 
Selenium
SeleniumSelenium
Selenium
Ruturaj Doshi
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
Archana Krushnan
 
Selenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and WorkingSelenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and Working
Disha Srivastava
 
Selenium IDE and Beyond
Selenium IDE and BeyondSelenium IDE and Beyond
Selenium IDE and Beyond
Samit Badle
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
Yuriy Gerasimov
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Yuriy Gerasimov
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
Nick Belhomme
 
Automated Web Testing With Selenium
Automated Web Testing With SeleniumAutomated Web Testing With Selenium
Automated Web Testing With Selenium
Deepak Mittal
 
Web automation using selenium.ppt
Web automation using selenium.pptWeb automation using selenium.ppt
Web automation using selenium.ppt
Ana Sarbescu
 
Selenium introduction
Selenium introductionSelenium introduction
Selenium introduction
Pankaj Dubey
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
RIA RUI Society
 
Web application testing with Selenium
Web application testing with SeleniumWeb application testing with Selenium
Web application testing with Selenium
Kerry Buckley
 
Selenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and WorkingSelenium IDE Introduction, Installation and Working
Selenium IDE Introduction, Installation and Working
Disha Srivastava
 
Selenium IDE and Beyond
Selenium IDE and BeyondSelenium IDE and Beyond
Selenium IDE and Beyond
Samit Badle
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
Yuriy Gerasimov
 

Similar to Get Started With Selenium 3 and Selenium 3 Grid (20)

Run Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test ManagerRun Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test Manager
Daniel Herken
 
Selenium 101 Webinar
Selenium 101 WebinarSelenium 101 Webinar
Selenium 101 Webinar
Daniel Herken
 
Selenium
SeleniumSelenium
Selenium
傑倫 鍾
 
Cross platform browser automation tests sdp
Cross platform browser automation tests   sdpCross platform browser automation tests   sdp
Cross platform browser automation tests sdp
Oren Ashkenazy
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
Roman Savitskiy
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
Er. Sndp Srda
 
探討Web ui自動化測試工具
探討Web ui自動化測試工具探討Web ui自動化測試工具
探討Web ui自動化測試工具
政億 林
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
Luke Maung
 
Selenium Testing with TestingBot.com
Selenium Testing with TestingBot.comSelenium Testing with TestingBot.com
Selenium Testing with TestingBot.com
testingbot
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
Sun Technlogies
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
政億 林
 
Introduction to Selenium and WebDriver
Introduction to Selenium and WebDriverIntroduction to Selenium and WebDriver
Introduction to Selenium and WebDriver
TechWell
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
Simon Guest
 
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
 
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialSelenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Alan Richardson
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Boni García
 
2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug
Philip Schlesinger
 
Selenium Full Material( apprendre Selenium).pdf
Selenium Full Material( apprendre Selenium).pdfSelenium Full Material( apprendre Selenium).pdf
Selenium Full Material( apprendre Selenium).pdf
Sdiri Ahmed
 
Browser-Based testing using Selenium
Browser-Based testing using SeleniumBrowser-Based testing using Selenium
Browser-Based testing using Selenium
ret0
 
Selenium
SeleniumSelenium
Selenium
Sun Technlogies
 
Run Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test ManagerRun Selenium Tests With Microsoft Test Manager
Run Selenium Tests With Microsoft Test Manager
Daniel Herken
 
Selenium 101 Webinar
Selenium 101 WebinarSelenium 101 Webinar
Selenium 101 Webinar
Daniel Herken
 
Cross platform browser automation tests sdp
Cross platform browser automation tests   sdpCross platform browser automation tests   sdp
Cross platform browser automation tests sdp
Oren Ashkenazy
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
Er. Sndp Srda
 
探討Web ui自動化測試工具
探討Web ui自動化測試工具探討Web ui自動化測試工具
探討Web ui自動化測試工具
政億 林
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
Luke Maung
 
Selenium Testing with TestingBot.com
Selenium Testing with TestingBot.comSelenium Testing with TestingBot.com
Selenium Testing with TestingBot.com
testingbot
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
政億 林
 
Introduction to Selenium and WebDriver
Introduction to Selenium and WebDriverIntroduction to Selenium and WebDriver
Introduction to Selenium and WebDriver
TechWell
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
Simon Guest
 
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
 
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialSelenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Alan Richardson
 
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Boni García
 
2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug2013 10-10 selenium presentation to ocjug
2013 10-10 selenium presentation to ocjug
Philip Schlesinger
 
Selenium Full Material( apprendre Selenium).pdf
Selenium Full Material( apprendre Selenium).pdfSelenium Full Material( apprendre Selenium).pdf
Selenium Full Material( apprendre Selenium).pdf
Sdiri Ahmed
 
Browser-Based testing using Selenium
Browser-Based testing using SeleniumBrowser-Based testing using Selenium
Browser-Based testing using Selenium
ret0
 
Ad

Recently uploaded (20)

Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
DVDFab Crack FREE Download Latest Version 2025
DVDFab Crack FREE Download Latest Version 2025DVDFab Crack FREE Download Latest Version 2025
DVDFab Crack FREE Download Latest Version 2025
younisnoman75
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Implementing promises with typescripts, step by step
Implementing promises with typescripts, step by stepImplementing promises with typescripts, step by step
Implementing promises with typescripts, step by step
Ran Wahle
 
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
Imma Valls Bernaus
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
DVDFab Crack FREE Download Latest Version 2025
DVDFab Crack FREE Download Latest Version 2025DVDFab Crack FREE Download Latest Version 2025
DVDFab Crack FREE Download Latest Version 2025
younisnoman75
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
How can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptxHow can one start with crypto wallet development.pptx
How can one start with crypto wallet development.pptx
laravinson24
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Implementing promises with typescripts, step by step
Implementing promises with typescripts, step by stepImplementing promises with typescripts, step by step
Implementing promises with typescripts, step by step
Ran Wahle
 
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
Imma Valls Bernaus
 
Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)Who Watches the Watchmen (SciFiDevCon 2025)
Who Watches the Watchmen (SciFiDevCon 2025)
Allon Mureinik
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categorie...
Lionel Briand
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Ad

Get Started With Selenium 3 and Selenium 3 Grid

  • 2. Today we will cover 1. What is Selenium? 2. How to setup a testing environment 3. Running your first test 4. Working with Selenium Grid 5. Simplify with the BrowseEmAll Grid 6. Q/A Session Introduction
  • 3. Supported by all major browser vendors: What is Selenium? Free and open source browser automation framework.
  • 4. What is Selenium? How does it work? Your Code
  • 5. What is Selenium? How does it work? Your Code Selenium
  • 6. What is Selenium? How does it work? Your Code Selenium IEDriver Edge Driver Firefox Driver Chrome Driver
  • 7. What is Selenium? How does it work? Your Code Selenium IEDriver Edge Driver Firefox Driver Chrome Driver Internet Explorer Microsoft Edge Firefox Chrome
  • 8. Supports automation of all major browsers: What is Selenium? Which browsers are supported?
  • 9. Selenium language bindings are available for: • Java • C# • Ruby • Python • JavaScript • Perl (third-party) • PHP (third-party) What is Selenium? Which programming languages are supported?
  • 10. • Install Firefox: https://www.mozilla.org • Install Google Chrome: https://www.google.com/chrome/browser/desktop/ • Add c:Selenium (or similar path on macOS / Linux) to your PATH Setup Selenium Requirements
  • 11. o Internet Explorer Driver: • Download (32bit or 64bit) http://www.seleniumhq.org/download/ • Extract to c:Selenium o Edge Driver: • Download https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ • Copy to c:Selenium o Chrome Driver: • Download https://sites.google.com/a/chromium.org/chromedriver/ • Copy to c:Selenium o Firefox Driver: • Download https://github.com/mozilla/geckodriver/releases • Extract to c:Selenium Setup Selenium Installing Drivers
  • 12. A Simple Test Running a simple Google query [TestMethod] public void GoogleForSelenium() { // Launch new instance for Firefox IWebDriver driver = new FirefoxDriver(); // Navigate to google driver.Navigate().GoToUrl("http://www.google.com"); // Find the input field for the search query IWebElement inputField = driver.FindElement(By.Name("q")); // Add some text to the input field inputField.SendKeys("Selenium"); // Submit the search inputField.Submit(); // Google uses JS to render the results page so we need to wait var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(o => o.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase)); // Use asserts like you would in unit tests Assert.IsTrue(driver.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase)); // close down the browser driver.Quit(); }
  • 14. A Simple Test [TestMethod] public void GoogleForSelenium_Chrome() { IWebDriver driver = new ChromeDriver(); GoogleForSelenium(driver); } [TestMethod] public void GoogleForSelenium_Edge() { IWebDriver driver = new EdgeDriver(); GoogleForSelenium(driver); } [TestMethod] public void GoogleForSelenium_InternetExplorer() { IWebDriver driver = new InternetExplorerDriver(); GoogleForSelenium(driver); } public void GoogleForSelenium(IWebDriver driver) { // Navigate to google driver.Navigate().GoToUrl("http://www.google.com");
  • 16. Selenium Grid can be used to run Selenium tests parallel and on multiple machines. This helps with: • Reducing the overall time of test execution • Running tests against browsers on different operating systems Selenium Grid What is Selenium Grid?
  • 18. Selenium Grid How does it work? Your Code Remote Driver
  • 19. Selenium Grid How does it work? Your Code Remote Driver Selenium Hub
  • 20. Selenium Grid How does it work? Your Code Remote Driver Selenium Hub Selenium Node Selenium Node Selenium Node
  • 21. 1. Download Java: https://www.java.com/en/download/ 2. Download Selenium Standalone Server: http://www.seleniumhq.org/download/ • Copy to c:Selenium 3. Start the Hub with the command line: • java -jar selenium-server-standalone-3.0.1.jar -role hub 4. Grid console available at: http://localhost:4444/grid/console Selenium Grid Setup a Hub
  • 22. 1. Create a node configuration file: { "capabilities": [{ "browserName": "firefox", "platform": "WINDOWS", "maxInstances": 1 }], "maxSession": 5, "port": 5555, "register": true } 2. Start the Node with the command line: • java -jar selenium-server-standalone-3.0.1.jar -role node -hub http://localhost:4444/grid/register -nodeConfig node.json Selenium Grid Setup a Node
  • 23. Selenium Grid [TestMethod] public void GoogleForSeleniumOnGrid() { // Launch new instance for Firefox IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.Firefox()); // Navigate to google driver.Navigate().GoToUrl("http://www.google.com"); // Find the input field for the search query IWebElement inputField = driver.FindElement(By.Name("q")); // Add some text to the input field inputField.SendKeys("Selenium"); // Submit the search inputField.Submit(); // Google uses JS to render the results page so we need to wait var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(o => o.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase)); // Use asserts like you would in unit tests Assert.IsTrue(driver.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase)); // close down the browser driver.Quit(); }
  • 26. BrowseEmAll Grid [TestMethod] public void GoogleForSeleniumOnGrid() { // Launch new instance for Firefox IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.Firefox()); // Navigate to google driver.Navigate().GoToUrl("http://www.google.com"); // Find the input field for the search query IWebElement inputField = driver.FindElement(By.Name("q")); // Add some text to the input field inputField.SendKeys("Selenium"); // Submit the search inputField.Submit(); // Google uses JS to render the results page so we need to wait var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(o => o.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase)); // Use asserts like you would in unit tests Assert.IsTrue(driver.Title.StartsWith("Selenium", StringComparison.OrdinalIgnoreCase)); // close down the browser driver.Quit(); }