SlideShare a Scribd company logo
1 of 42
What's coming our
way?
- Hitesh Prajapati
AGENDA
 I n t r o d u c t i o n
 S e l e n i u m 4 F e a t u r e s
 Relative Locators (Friendly Locators
Prev.)
 Capturing Element Screenshot
 Windows/Tab Handling
 Chrome Dev Tools
 Selenium Grid
 T r a n s i t i o n f r o m 3 . X t o 4 . X
 Q & A
2
3
3
INTRODUCTION
4
SELENIUM 4 : WHAT’S
NEW?
 Relative Locators (Friendly
Locators Prev.)
 Capturing Element Screenshot
 Windows/Tab Handling
 Chrome Dev Tools
 Selenium Grid
5
RELATIVE LOCATORS
• Above
• Below
• ToLeftOf
• ToRightOf
• Near
6
RELATIVE LOCATORS : BAD
EXAMPLE
Link To Source Code
7
RELATIVE LOCATORS : BAD EXAMPLE -
RESULT
8
RELATIVE LOCATORS : GOOD
EXAMPLE
Link To Source Code
9
RELATIVE LOCATORS : GOOD EXAMPLE -
RESULT
10
11
TECH
STACK
12
RELATIVE LOCATORS : HOW DOES IT
WORK?
 Selenium uses the JavaScript function getBoundingClientRect() to find the relative
elements
 The Element.getBoundingClientRect() method returns a DOMRect object providing information
about the size of an element and its position relative to the viewport.
 The returned DOMRect value contains the left, top, right, bottom, x, y, width and height.
 In case of near(), it makes use of getBoundingClientRect() and tries to locate an element
which is at most 50px away from the specified element.
 The overloaded method of near(), let’s you override default behavior of locating an
element (which is 50px) by passing pixels value that you want to use.
RelativeLocator.withTagName().near()
https://www.selenium.dev/documentation/en/getting_started_with_webdriver/locating
13
RELATIVE LOCATORS : HOW DOES IT
WORK?
Syntax
https://developer.mozilla.org/en-
14
CAPTURING ELEMENT SCREENSHOT
Link To Source
15
WINDOW HANDLING
16
TAB HANDLING
17
CHROME DEV
TOOLS
 Basic Authentication
 Access Console Logs
 Mocking Geo-Location
 Load In-Secure Web Sites
 Block Specific Resources/URLs
 Simulate Network Speed
 Simulate Device Mode
 Changing User Agents
 Capture HTTP Requests
 Simulate Time Zones
18
WHAT’S CHANGED?
ChromeDriver / EdgeDriver 
RemoteWebDriver
Selenium 3.x
Selenium 4.x ChromeDriver / EdgeDriver  ChromiumDriver 
RemoteWebDriver
19
WHAT’S CHANGED?
ChromeDriver  ChromiumDriver 
RemoteWebDriver
https://github.com/SeleniumHQ/selenium/tree/trunk/java/client/src/org/openqa/sele
20
CDP : BASIC AUTHENTICATION
http://UserName:Password@WebSiteUrl
Selenium 3.x
Selenium 4.x
Chrome DevTools Protocol : Network
21
CDP : ACCESS CONSOLE LOGS
Chrome DevTools Protocol : Log Domain
22
CDP : MOCK GEO-LOCATION
Chrome DevTools Protocol : Emulation
23
CDP : LOAD INSECURE WEBSITES
Chrome DevTools Protocol : Security
24
CDP : BLOCK SPECIFIC RESOURCE /
URL
Chrome DevTools Protocol : Network
25
CDP : SIMULATE NETWORK SPEED
Chrome DevTools Protocol : Network
26
CDP : SIMULATE DEVICE MODE
Chrome DevTools Protocol : Emulation
27
CDP : CHANGING USER AGENTS
https://www.whoishostingthis.com/tools/user-
The user agent application - is Mozilla version 5.0, or a piece of software compatible with
it.
The operating system - is OS X version 10.2.2 (and is running on a Mac).
The client - is Chrome version 51.0.2704.84 and is based on Safari version 537.36.
The engine - responsible for displaying content on this device is AppleWebKit version
537.36 (and KHTML, an open-source layout engine, is present too).
What is User Agent?
The user agent string contains information about the user’s web browser name, operating
system, device type, and other information.
Take this UA string as an example :
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36
28
CDP : CHANGING USER AGENTS
User Agent String
Chrome DevTools Protocol : Network
29
CDP : CAPTURE HTTP REQUESTS
Chrome DevTools Protocol : Network
30
CDP : SIMULATE TIME-ZONE
Chrome DevTools Protocol : Emulation
TRANSITION
FROM 3.X TO
4.X
31
32
SELENIUM 3 ARCHITECTURE
Selenium Language
Bindings
JSON
Wire
Protoco
l
elenium Clients
ChromeDr
iver
FirefoxD
river
EdgeDriv
er
SafariDr
iver
OperaDri
ver
Browser Drivers Real Browsers
Server
HTTP
Request(s)
HTTP
Response(s)
Over HTTP Server
HTTP
Protocol
REST
APIs
https://github.com/SeleniumHQ/selenium/wi
ki/JsonWireProtocol
200 OK
W3C WEB-DRIVER
SPECIFICATION
https://www.w3.org/TR/webdriver
2/
 W h a t i s W 3 C ?
 W h y W 3 C ?
 W h a t i s W 3 C W e b D r i v e r
S p e c i f i c a t i o n ?
Selenium W3C WebDriver protocol defines the
ways that browser actions are executed.
WebDriver is a remote control interface that
enables introspection and control of user
agents. It provides a platform and language-
neutral wire protocol as a way for out-of-
34
SELENIUM 4 ARCHITECTURE
Selenium Language
Bindings
W3C
Protoc
ol
Selenium Clients
ChromeDr
iver
FirefoxD
river
EdgeDriv
er
SafariDr
iver
Browser Drivers Real Browsers
Server
https://www.w3.org/TR/we
bdriver2/
35
TRANSITION FROM 3.X TO 4.X : WHAT’S
CHANGED?
>= 3.8.0 to
3.141.59
>= 4.X
<
3.8
Protocol
ChromeDriv
er
<
v75.x
>=
v75.x
>=
v75.x
GeckoDrive
r
<
v47.x
>=
v47.x
>=
v47.x
<
v47.x
https://firefox-source-
(SE <
v3.11)
(SE >=
v3.11)
36
SELENIUM 4.0 : WEB-DRIVER TEST
RESULTS
http://webdriver-herald.herokuapp.com/
37
ADVANTAGES OF W3C -
WD
 Standards
• Your tests should run more
consistently between browsers
because this is a standard that
all browser vendors will
develop. This means common code
for all browsers.
 Stability
• More stable test case execution
• Less number of exceptions while
executing tests across various
browsers.
38
TRANSITION FROM 3.X TO 4.X : ACTION
API
< v4.x
package
org.openqa.selenium.interactions
Click
>=
v4.x
.moveToElement(WebElement).click() .click(WebElement)
Click And
Hold
.moveToElement(WebElement).clickAndHold() .clickAndHold(WebElement)
Context
Click
.moveToElement(WebElement).contextClick() .contextClick(WebElement)
Double
Click
.moveToElement(WebElement).doubleClick() .doubleClick(WebElement)
Release Left
Mouse
.moveToElement(WebElement).release() .release(WebElement)
https://www.selenium.dev/selenium/docs/api/java/index
39
40
41
REFERENCES
Demo Source Code : https://github.com/HItesh007/selenium4-
demo
Relative Locator :
https://www.selenium.dev/documentation/en/getting_started_with_webdriver/locati
ng_elements/
Bounding Client Doc : https://developer.mozilla.org/en-
US/docs/Web/API/Element/getBoundingClientRect
Network Domain : https://chromedevtools.github.io/devtools-
protocol/tot/Network/
Log Domain : https://chromedevtools.github.io/devtools-
protocol/tot/Log/
Emulation Domain :
https://chromedevtools.github.io/devtools-
protocol/tot/Emulation/
Security Domain :
Chrome Dev Tools
Documentation
JSON Wire Protocol :
https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
W3C WebDriver Specification : https://www.w3.org/TR/webdriver2/
Selenium 4 - WD Test Results : http://webdriver-herald.herokuapp.com/
Selenium 4 – Deprecated List :
https://www.selenium.dev/selenium/docs/api/java/index.html?deprecated-
list.html
User Agent : https://www.whoishostingthis.com/tools/user-agent/
Explore User Agent String :
https://developers.whatismybrowser.com/useragents/explore/
THANK YOU
H I T E S H P R A J A P A T I
h i t e s h p r a j a p a t i 1 9 9 2 @ g m a i
l . c o m
/ i n / h i t e s h p r a j a p a t i 0 0 7 /
/ H I t e s h 0 0 7
/ H i t e s h _ p r a j a p a t i 1 9 9 2

More Related Content

What's hot

Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Seleniumadamcarmi
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The BasicsPhilip Langer
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridDaniel Herken
 
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 2011Yuriy Gerasimov
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試 政億 林
 
Upgrading to Selenium WebDriver version 3
Upgrading to Selenium WebDriver version 3Upgrading to Selenium WebDriver version 3
Upgrading to Selenium WebDriver version 3Alan Richardson
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Puneet Kala
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests🌱 Dale Spoonemore
 
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, automationRIA RUI Society
 
How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)Dasun Eranthika
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Seleniumvivek_prahlad
 

What's hot (20)

Selenium
SeleniumSelenium
Selenium
 
Jenkins & Selenium
Jenkins & SeleniumJenkins & Selenium
Jenkins & Selenium
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The Basics
 
Get Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 GridGet Started With Selenium 3 and Selenium 3 Grid
Get Started With Selenium 3 and Selenium 3 Grid
 
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
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
 
前端網頁自動測試
前端網頁自動測試 前端網頁自動測試
前端網頁自動測試
 
Upgrading to Selenium WebDriver version 3
Upgrading to Selenium WebDriver version 3Upgrading to Selenium WebDriver version 3
Upgrading to Selenium WebDriver version 3
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests
 
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
 
Selenium drivers
Selenium driversSelenium drivers
Selenium drivers
 
Selenium Webdriver
Selenium WebdriverSelenium Webdriver
Selenium Webdriver
 
How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)How to Configure Selenium WebDriver (java)
How to Configure Selenium WebDriver (java)
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Selenium
SeleniumSelenium
Selenium
 
Web Test Automation with Selenium
Web Test Automation with SeleniumWeb Test Automation with Selenium
Web Test Automation with Selenium
 
Maven 3.0 at Øredev
Maven 3.0 at ØredevMaven 3.0 at Øredev
Maven 3.0 at Øredev
 
Node.js vs Play Framework
Node.js vs Play FrameworkNode.js vs Play Framework
Node.js vs Play Framework
 
Selenium
SeleniumSelenium
Selenium
 

Similar to Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati

Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationSauce Labs
 
Building Web Sites that Work Everywhere
Building Web Sites that Work EverywhereBuilding Web Sites that Work Everywhere
Building Web Sites that Work EverywhereDoris Chen
 
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 ocjugPhilip Schlesinger
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Peyman Fakharian
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDEMurageppa-QA
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patternsukdpe
 
Selenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademySelenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademyTIB Academy
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupDave Haeffner
 
The DevOps Journey
The DevOps JourneyThe DevOps Journey
The DevOps JourneyMicro Focus
 
Selenium training for beginners
Selenium training for beginnersSelenium training for beginners
Selenium training for beginnersTIB Academy
 
Mobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructureMobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructureMichael Palotas
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfAnuragMourya8
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using SeleniumNikhil Kapoor
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with AppceleratorMatt Raible
 

Similar to Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati (20)

Selenium.pptx
Selenium.pptxSelenium.pptx
Selenium.pptx
 
Robot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs IntegrationRobot Framework Introduction & Sauce Labs Integration
Robot Framework Introduction & Sauce Labs Integration
 
Building Web Sites that Work Everywhere
Building Web Sites that Work EverywhereBuilding Web Sites that Work Everywhere
Building Web Sites that Work Everywhere
 
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
 
Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium Web UI Tests: Introduce UI tests using Selenium
Web UI Tests: Introduce UI tests using Selenium
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
 
Codeception
CodeceptionCodeception
Codeception
 
Vorlon.js
Vorlon.jsVorlon.js
Vorlon.js
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Selenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademySelenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB Academy
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
Stetho demo
Stetho demoStetho demo
Stetho demo
 
The DevOps Journey
The DevOps JourneyThe DevOps Journey
The DevOps Journey
 
Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
Selenium training for beginners
Selenium training for beginnersSelenium training for beginners
Selenium training for beginners
 
Mobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructureMobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructure
 
selenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdfselenium-webdriver-interview-questions.pdf
selenium-webdriver-interview-questions.pdf
 
Test Automation Using Selenium
Test Automation Using SeleniumTest Automation Using Selenium
Test Automation Using Selenium
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 

More from 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
 

More from 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...
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Session on Selenium 4 : What’s coming our way? by Hitesh Prajapati

  • 1. What's coming our way? - Hitesh Prajapati
  • 2. AGENDA  I n t r o d u c t i o n  S e l e n i u m 4 F e a t u r e s  Relative Locators (Friendly Locators Prev.)  Capturing Element Screenshot  Windows/Tab Handling  Chrome Dev Tools  Selenium Grid  T r a n s i t i o n f r o m 3 . X t o 4 . X  Q & A 2
  • 4. 4 SELENIUM 4 : WHAT’S NEW?  Relative Locators (Friendly Locators Prev.)  Capturing Element Screenshot  Windows/Tab Handling  Chrome Dev Tools  Selenium Grid
  • 5. 5 RELATIVE LOCATORS • Above • Below • ToLeftOf • ToRightOf • Near
  • 6. 6 RELATIVE LOCATORS : BAD EXAMPLE Link To Source Code
  • 7. 7 RELATIVE LOCATORS : BAD EXAMPLE - RESULT
  • 8. 8 RELATIVE LOCATORS : GOOD EXAMPLE Link To Source Code
  • 9. 9 RELATIVE LOCATORS : GOOD EXAMPLE - RESULT
  • 10. 10
  • 12. 12 RELATIVE LOCATORS : HOW DOES IT WORK?  Selenium uses the JavaScript function getBoundingClientRect() to find the relative elements  The Element.getBoundingClientRect() method returns a DOMRect object providing information about the size of an element and its position relative to the viewport.  The returned DOMRect value contains the left, top, right, bottom, x, y, width and height.  In case of near(), it makes use of getBoundingClientRect() and tries to locate an element which is at most 50px away from the specified element.  The overloaded method of near(), let’s you override default behavior of locating an element (which is 50px) by passing pixels value that you want to use. RelativeLocator.withTagName().near() https://www.selenium.dev/documentation/en/getting_started_with_webdriver/locating
  • 13. 13 RELATIVE LOCATORS : HOW DOES IT WORK? Syntax https://developer.mozilla.org/en-
  • 17. 17 CHROME DEV TOOLS  Basic Authentication  Access Console Logs  Mocking Geo-Location  Load In-Secure Web Sites  Block Specific Resources/URLs  Simulate Network Speed  Simulate Device Mode  Changing User Agents  Capture HTTP Requests  Simulate Time Zones
  • 18. 18 WHAT’S CHANGED? ChromeDriver / EdgeDriver  RemoteWebDriver Selenium 3.x Selenium 4.x ChromeDriver / EdgeDriver  ChromiumDriver  RemoteWebDriver
  • 19. 19 WHAT’S CHANGED? ChromeDriver  ChromiumDriver  RemoteWebDriver https://github.com/SeleniumHQ/selenium/tree/trunk/java/client/src/org/openqa/sele
  • 20. 20 CDP : BASIC AUTHENTICATION http://UserName:Password@WebSiteUrl Selenium 3.x Selenium 4.x Chrome DevTools Protocol : Network
  • 21. 21 CDP : ACCESS CONSOLE LOGS Chrome DevTools Protocol : Log Domain
  • 22. 22 CDP : MOCK GEO-LOCATION Chrome DevTools Protocol : Emulation
  • 23. 23 CDP : LOAD INSECURE WEBSITES Chrome DevTools Protocol : Security
  • 24. 24 CDP : BLOCK SPECIFIC RESOURCE / URL Chrome DevTools Protocol : Network
  • 25. 25 CDP : SIMULATE NETWORK SPEED Chrome DevTools Protocol : Network
  • 26. 26 CDP : SIMULATE DEVICE MODE Chrome DevTools Protocol : Emulation
  • 27. 27 CDP : CHANGING USER AGENTS https://www.whoishostingthis.com/tools/user- The user agent application - is Mozilla version 5.0, or a piece of software compatible with it. The operating system - is OS X version 10.2.2 (and is running on a Mac). The client - is Chrome version 51.0.2704.84 and is based on Safari version 537.36. The engine - responsible for displaying content on this device is AppleWebKit version 537.36 (and KHTML, an open-source layout engine, is present too). What is User Agent? The user agent string contains information about the user’s web browser name, operating system, device type, and other information. Take this UA string as an example : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36
  • 28. 28 CDP : CHANGING USER AGENTS User Agent String Chrome DevTools Protocol : Network
  • 29. 29 CDP : CAPTURE HTTP REQUESTS Chrome DevTools Protocol : Network
  • 30. 30 CDP : SIMULATE TIME-ZONE Chrome DevTools Protocol : Emulation
  • 32. 32 SELENIUM 3 ARCHITECTURE Selenium Language Bindings JSON Wire Protoco l elenium Clients ChromeDr iver FirefoxD river EdgeDriv er SafariDr iver OperaDri ver Browser Drivers Real Browsers Server HTTP Request(s) HTTP Response(s) Over HTTP Server HTTP Protocol REST APIs https://github.com/SeleniumHQ/selenium/wi ki/JsonWireProtocol 200 OK
  • 33. W3C WEB-DRIVER SPECIFICATION https://www.w3.org/TR/webdriver 2/  W h a t i s W 3 C ?  W h y W 3 C ?  W h a t i s W 3 C W e b D r i v e r S p e c i f i c a t i o n ? Selenium W3C WebDriver protocol defines the ways that browser actions are executed. WebDriver is a remote control interface that enables introspection and control of user agents. It provides a platform and language- neutral wire protocol as a way for out-of-
  • 34. 34 SELENIUM 4 ARCHITECTURE Selenium Language Bindings W3C Protoc ol Selenium Clients ChromeDr iver FirefoxD river EdgeDriv er SafariDr iver Browser Drivers Real Browsers Server https://www.w3.org/TR/we bdriver2/
  • 35. 35 TRANSITION FROM 3.X TO 4.X : WHAT’S CHANGED? >= 3.8.0 to 3.141.59 >= 4.X < 3.8 Protocol ChromeDriv er < v75.x >= v75.x >= v75.x GeckoDrive r < v47.x >= v47.x >= v47.x < v47.x https://firefox-source- (SE < v3.11) (SE >= v3.11)
  • 36. 36 SELENIUM 4.0 : WEB-DRIVER TEST RESULTS http://webdriver-herald.herokuapp.com/
  • 37. 37 ADVANTAGES OF W3C - WD  Standards • Your tests should run more consistently between browsers because this is a standard that all browser vendors will develop. This means common code for all browsers.  Stability • More stable test case execution • Less number of exceptions while executing tests across various browsers.
  • 38. 38 TRANSITION FROM 3.X TO 4.X : ACTION API < v4.x package org.openqa.selenium.interactions Click >= v4.x .moveToElement(WebElement).click() .click(WebElement) Click And Hold .moveToElement(WebElement).clickAndHold() .clickAndHold(WebElement) Context Click .moveToElement(WebElement).contextClick() .contextClick(WebElement) Double Click .moveToElement(WebElement).doubleClick() .doubleClick(WebElement) Release Left Mouse .moveToElement(WebElement).release() .release(WebElement) https://www.selenium.dev/selenium/docs/api/java/index
  • 39. 39
  • 40. 40
  • 41. 41 REFERENCES Demo Source Code : https://github.com/HItesh007/selenium4- demo Relative Locator : https://www.selenium.dev/documentation/en/getting_started_with_webdriver/locati ng_elements/ Bounding Client Doc : https://developer.mozilla.org/en- US/docs/Web/API/Element/getBoundingClientRect Network Domain : https://chromedevtools.github.io/devtools- protocol/tot/Network/ Log Domain : https://chromedevtools.github.io/devtools- protocol/tot/Log/ Emulation Domain : https://chromedevtools.github.io/devtools- protocol/tot/Emulation/ Security Domain : Chrome Dev Tools Documentation JSON Wire Protocol : https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol W3C WebDriver Specification : https://www.w3.org/TR/webdriver2/ Selenium 4 - WD Test Results : http://webdriver-herald.herokuapp.com/ Selenium 4 – Deprecated List : https://www.selenium.dev/selenium/docs/api/java/index.html?deprecated- list.html User Agent : https://www.whoishostingthis.com/tools/user-agent/ Explore User Agent String : https://developers.whatismybrowser.com/useragents/explore/
  • 42. THANK YOU H I T E S H P R A J A P A T I h i t e s h p r a j a p a t i 1 9 9 2 @ g m a i l . c o m / i n / h i t e s h p r a j a p a t i 0 0 7 / / H I t e s h 0 0 7 / H i t e s h _ p r a j a p a t i 1 9 9 2