SlideShare a Scribd company logo
Copyright © SELA Software & Education Labs, Ltd. | 14-18 Baruch Hirsch St., Bnei Brak 51202, Israel | www.selagroup.com
Cross Browser Platform in Automation
Testing
Oren Ashkenazy
Mail: orena@sela.co.il
Blog: http://blogs.microsoft.co.il/oren604/
Cross Platform Browser Testing
Intro to Selenium
Selenium Architecture
Selenium IDE
Selenium WebDriver
JavaScriptExecuter
WebDriverJS
Selenium Server
Agenda
Cross platform Browser Testing
Advantages…
• Greater Test Coverage
• Increased Reusability
• Business advantage
• Secure Deployment To Production
Test Plan
Multiple Test Plan Capacity Work
𝐗 𝐧𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 𝐜𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐫𝐢𝐨𝐧𝐬
=
…
The Solution…
Selenium Architecture
Code Behind
Browser Drivers
C# Java Ruby Python 2
WebDriver API
IE Firefox Chrome Safari
Demo
Selenium IDE – Record & Running A
Test
Demo
VS & Selenium Webdriver
IWebDriver Basic Methods
Actions
Clear();
Click();
FindElement(string);
Array/List FindElements(string,string…);
SendKeys(string);
Submit();
Explore
GetAttribute(); (Id, ClassName, etc)
GetCSSValue(); (font-size, color, etc)
Enable;
Selected();
Size();
Text;
IJavaScriptExecuter
Demo
Execute JS with Selenium WebDriver
Execute JS with Selenium WebDriver
Get the running browser agent/webdriver type
IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
String BrowserAgent =
(String)((IJavaScriptExecutor)driver).ExecuteScript("
return navigator.userAgent;");
Execute JS with Selenium WebDriver
Pass browserAgent to the test method
public void FillAcountHolderData(IWebDriver driver, User user, string BrowserAgent)
{
if (BrowserAgent.Contains(“FireFox”)
} { // todo….
}
if (BrowserAgent.Contains(“Chrome”)
{ // todo….
}
}
Cross Platform Testing
Reference for automation browser platforms:
https://code.google.com/p/selenium/w/list?q=label:WebDriver
WebDriverJS
+ =
The difference between WebDriver to
WebDriverJS
Sync
Asynchronous
C# Java Ruby
JavaScript
Demo
WebDriverJS
Open source web testing frameworks
Selenium Server - Agenda
What Is Selenium Server?
What Is Selenium Grid?
Setting the hub (Server)
Setting the node (Client)
Using DesiredCapabilities
What Is Selenium Server?
Selenium
Code
Remote
Control
Selenium
Sever
IEFirefoxChromeSafari
Drivers
What Is Selenium Grid?
Selenium
Code
Remote
Control
Hub
Selenium Sever
(Win 7 +
Chrome)
Selenium Sever
(Win 8 + IE)
Selenium Sever
(Centos +
Firefox)
Chrome
Driver
IEDriver
Firefox
Driver
Demo
Setting the Hub
Install & Configure
• What to Install?
o JRE (Java Runtime Environment)
o Selenium Server (JAR File)
• How To Configure The Hub?
o Run CMD
o Go to the path you downloaded the Jar file: CD “Path Name”
o Type the command: java -jar “jar file name” -role hub
o After running this command you will receive an output of the
selenium server address (The default address is
http://127.0.0.1:4444
o Leave CMD window open while you want the selenium server
process to keep running
Demo
Setting up a server node
Setting up a server node
• How to configure?
o Run CMD
o Go to the path you downloaded the Jar file: CD “Path
Name”
o Type the command: java -jar “Jar File Name” -role node
-hub http://localhost:4444/grid/register
o Validate the node server is up by going to:
http://localhost:4444/grid/console
Demo
Running a Test
Use the RemoteWebDriver and
the DesiredCapabilities object to define which
browser, version and platform you wish to use
private IWebDriver driver = new RemoteWebDriver (new
Uri("http://localhost:4444/wd/hub"),
DesiredCapabilities.Firefox());
Running a test using the grid
In this example the test will run on machine/s that
have IOS and Firefox driver
private IWebDriver driver = new RemoteWebDriver(new
Uri("http://localhost:4444/wd/hub"),
new DesiredCapabilities("Firefox", "", new
Platform(PlatformType.Mac)));
Using a specific configuration
Selenium Grid Wiki
More information:
https://code.google.com/p/selenium/wiki/Grid2
Questions

More Related Content

PDF
What is the taste of the Selenide
PPTX
Moving a Windows environment to the cloud - DevOps Galway Meetup
PDF
BP-6 Repository Customization Best Practices
PPSX
Selenium WebDriver
PPTX
Installation joomla
PDF
JBoss Negotiation in AS7
PDF
Chrome Devtools Protocol via Selenium/Appium (Japanese)
PPTX
DDD Melbourne 2014 security in ASP.Net Web API 2
What is the taste of the Selenide
Moving a Windows environment to the cloud - DevOps Galway Meetup
BP-6 Repository Customization Best Practices
Selenium WebDriver
Installation joomla
JBoss Negotiation in AS7
Chrome Devtools Protocol via Selenium/Appium (Japanese)
DDD Melbourne 2014 security in ASP.Net Web API 2

What's hot (12)

PPTX
Build RESTful API Using Express JS
PDF
JBoss AS 7 따라잡기
PDF
Level Up! - Practical Windows Privilege Escalation
PDF
Slides Cassandra
PPTX
Apache Maven basics
PPT
Mobile for web
ODP
Drupal Security Hardening
PDF
State of Solr Security 2016: Presented by Ishan Chattopadhyaya, Lucidworks
PDF
Drupal and Security: What You Need to Know
PPTX
Our practice of designing and implementing REST-service API for existing system
PDF
How fun of privilege escalation Red Pill2017
PDF
Build RESTful API Using Express JS
JBoss AS 7 따라잡기
Level Up! - Practical Windows Privilege Escalation
Slides Cassandra
Apache Maven basics
Mobile for web
Drupal Security Hardening
State of Solr Security 2016: Presented by Ishan Chattopadhyaya, Lucidworks
Drupal and Security: What You Need to Know
Our practice of designing and implementing REST-service API for existing system
How fun of privilege escalation Red Pill2017
Ad

Similar to Cross platform browser automation tests sdp (20)

PDF
Cross Browser Testing using Selenium GRID.pdf
PDF
Cross Browser Testing using Selenium GRID
PPTX
Get Started With Selenium 3 and Selenium 3 Grid
PPTX
Selenium 101 Webinar
PDF
Mobile Test Automation using one API and one infrastructure
PPT
Selenium Java for Beginners by Sujit Pathak
KEY
Getting started with Selenium 2
PPTX
Selenium Basics and Overview topics.pptx
PPTX
Selenium Basics and Overview1233444.pptx
PPTX
Python selenium
PPTX
SKILLWISE_SELENIUM
PPTX
Selenium And Its Types
PPTX
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
PPTX
Selenium training
PPT
QSpiders - Automation using Selenium
PPT
Selenium
ODP
Mastering selenium for automated acceptance tests
DOC
Selenium Automation Using Ruby
PDF
Selenium -Test automation for web applications
PPTX
Cross Browser Testing using Selenium GRID.pdf
Cross Browser Testing using Selenium GRID
Get Started With Selenium 3 and Selenium 3 Grid
Selenium 101 Webinar
Mobile Test Automation using one API and one infrastructure
Selenium Java for Beginners by Sujit Pathak
Getting started with Selenium 2
Selenium Basics and Overview topics.pptx
Selenium Basics and Overview1233444.pptx
Python selenium
SKILLWISE_SELENIUM
Selenium And Its Types
Selenium Tutorial For Beginners | Selenium Automation Testing Tutorial | Sele...
Selenium training
QSpiders - Automation using Selenium
Selenium
Mastering selenium for automated acceptance tests
Selenium Automation Using Ruby
Selenium -Test automation for web applications
Ad

Recently uploaded (20)

PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ai tools demonstartion for schools and inter college
PDF
System and Network Administraation Chapter 3
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
history of c programming in notes for students .pptx
PDF
top salesforce developer skills in 2025.pdf
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administration Chapter 2
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
AI in Product Development-omnex systems
PPTX
Operating system designcfffgfgggggggvggggggggg
Upgrade and Innovation Strategies for SAP ERP Customers
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ai tools demonstartion for schools and inter college
System and Network Administraation Chapter 3
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
history of c programming in notes for students .pptx
top salesforce developer skills in 2025.pdf
Softaken Excel to vCard Converter Software.pdf
Reimagine Home Health with the Power of Agentic AI​
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Introduction to Artificial Intelligence
System and Network Administration Chapter 2
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
AI in Product Development-omnex systems
Operating system designcfffgfgggggggvggggggggg

Cross platform browser automation tests sdp

  • 1. Copyright © SELA Software & Education Labs, Ltd. | 14-18 Baruch Hirsch St., Bnei Brak 51202, Israel | www.selagroup.com Cross Browser Platform in Automation Testing Oren Ashkenazy Mail: orena@sela.co.il Blog: http://blogs.microsoft.co.il/oren604/
  • 2. Cross Platform Browser Testing Intro to Selenium Selenium Architecture Selenium IDE Selenium WebDriver JavaScriptExecuter WebDriverJS Selenium Server Agenda
  • 3. Cross platform Browser Testing Advantages… • Greater Test Coverage • Increased Reusability • Business advantage • Secure Deployment To Production
  • 5. Multiple Test Plan Capacity Work 𝐗 𝐧𝐮𝐦𝐛𝐞𝐫 𝐨𝐟 𝐜𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐫𝐢𝐨𝐧𝐬 =
  • 6.
  • 8. Selenium Architecture Code Behind Browser Drivers C# Java Ruby Python 2 WebDriver API IE Firefox Chrome Safari
  • 9. Demo Selenium IDE – Record & Running A Test
  • 10. Demo VS & Selenium Webdriver
  • 11. IWebDriver Basic Methods Actions Clear(); Click(); FindElement(string); Array/List FindElements(string,string…); SendKeys(string); Submit(); Explore GetAttribute(); (Id, ClassName, etc) GetCSSValue(); (font-size, color, etc) Enable; Selected(); Size(); Text;
  • 13. Demo Execute JS with Selenium WebDriver
  • 14. Execute JS with Selenium WebDriver Get the running browser agent/webdriver type IJavaScriptExecutor js = (IJavaScriptExecutor)driver; String BrowserAgent = (String)((IJavaScriptExecutor)driver).ExecuteScript(" return navigator.userAgent;");
  • 15. Execute JS with Selenium WebDriver Pass browserAgent to the test method public void FillAcountHolderData(IWebDriver driver, User user, string BrowserAgent) { if (BrowserAgent.Contains(“FireFox”) } { // todo…. } if (BrowserAgent.Contains(“Chrome”) { // todo…. } }
  • 16. Cross Platform Testing Reference for automation browser platforms: https://code.google.com/p/selenium/w/list?q=label:WebDriver
  • 18. The difference between WebDriver to WebDriverJS Sync Asynchronous C# Java Ruby JavaScript
  • 20. Open source web testing frameworks
  • 21. Selenium Server - Agenda What Is Selenium Server? What Is Selenium Grid? Setting the hub (Server) Setting the node (Client) Using DesiredCapabilities
  • 22. What Is Selenium Server? Selenium Code Remote Control Selenium Sever IEFirefoxChromeSafari Drivers
  • 23. What Is Selenium Grid? Selenium Code Remote Control Hub Selenium Sever (Win 7 + Chrome) Selenium Sever (Win 8 + IE) Selenium Sever (Centos + Firefox) Chrome Driver IEDriver Firefox Driver
  • 25. Install & Configure • What to Install? o JRE (Java Runtime Environment) o Selenium Server (JAR File) • How To Configure The Hub? o Run CMD o Go to the path you downloaded the Jar file: CD “Path Name” o Type the command: java -jar “jar file name” -role hub o After running this command you will receive an output of the selenium server address (The default address is http://127.0.0.1:4444 o Leave CMD window open while you want the selenium server process to keep running
  • 26. Demo Setting up a server node
  • 27. Setting up a server node • How to configure? o Run CMD o Go to the path you downloaded the Jar file: CD “Path Name” o Type the command: java -jar “Jar File Name” -role node -hub http://localhost:4444/grid/register o Validate the node server is up by going to: http://localhost:4444/grid/console
  • 29. Use the RemoteWebDriver and the DesiredCapabilities object to define which browser, version and platform you wish to use private IWebDriver driver = new RemoteWebDriver (new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.Firefox()); Running a test using the grid
  • 30. In this example the test will run on machine/s that have IOS and Firefox driver private IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), new DesiredCapabilities("Firefox", "", new Platform(PlatformType.Mac))); Using a specific configuration
  • 31. Selenium Grid Wiki More information: https://code.google.com/p/selenium/wiki/Grid2

Editor's Notes

  • #4: Greater Coverage – More time for QA doing manual exploratory/risk-based testing. Increased Reusability – Tests can be ran across different platforms and environments Business advantage – we get to more users the more platform we support
  • #9: Selenium webdriver has 3 layers of architecture: Code Behind is the language we can use it’s code to run selenium commands. These commands communicate with the WebDriver, the WebDriver contains set of common library which allow to send command to respective drivers through HTML and DOM. The driver listens to the commands from the code and simulate it on a real browser.
  • #13: JavaScriptExecutor is an interface which provides mechanism to execute Javascript through selenium driver. It provides “executescript” & "executeAsyncScript" methods, to run JavaScript in the context of the currently selected frame or window. Why we use it? To enhance the capabilities of the existing scripts by performing javascript injection into our application under test. In simple words  “Javascript can be executed within the browser with the help of JavaScript Executor.”
  • #18: As mentioned, WebDriver has a number of bindings for various languages like Ruby, Python etc. JavaScript being the language of choice for the web, is the latest one to make it to the list. So as you might guess, WebDriverJS is simply a wrapper over the JSON wire protocol exposing high level functions to make our life easy.
  • #21: WebdriverIO Selenium 2.0 bindings for NodeJS NightWatch Selenium 2.0 bindings for NodeJS with build in assertion framework PhantomJS – No browser required Headless web testing. Page automation. Access and manipulate web pages with the standard DOM API, or with usual libraries like jQuery. Screen capture. Programmatically capture web contents, including CSS, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. Network monitoring. Automate performance analysis, track page loading and export as standard HAR format.
  • #23: Selenium Sever allow us to run selenium tests on remote machines. The command will be send to the server and the server will execute the test by the selected driver.
  • #24: In Selenium Grid mode we have a network of servers that receives the commands through network hub, each set of command to a specific selenium server. Selenium Grid allows you to : Scale by distributing tests on several machines ( parallel execution ) Manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS. Minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance.