Skip to main content
Selenium 4 with Simon Stewart
Our Speakers
Simon is the Selenium Project’s lead, the
creator of WebDriver, and the co-editor of the
W3C WebDriver specification. His career has
lead him through ThoughtWorks, Google, and
Facebook. 
Praveen is the Director of Product Management
and Product Marketing at BrowserStack. In his
previous life, Praveen was a full-stack
developer, and loves to talk about the world
before and after AJAX .
What we’ll be covering
• Selenium 4- the what and the why
• Selenium 4 and BrowserStack
Selenium 4
Simon Stewart (@shs96c)

Selenium Project Lead
TL;DR
• Why the major version number bump?
• A new IDE
• Stable user-facing APIs
• New tricks
• CDP integration
• Friendly locators
• A Modernised Selenium Grid
Selenium is a family IDE, WebDriver, Grid
https://unsplash.com/photos/SIOdjcYotms
IDE: Revivified!
Thanks, SideX and
Applitools
A nice record/playback experience Selenium IDE is back!
https://unsplash.com/photos/2Aq35JCbNFA
It’s an Electron App
Tight Chrome
integration
https://unsplash.com/photos/hZq0RfHDXks
Can listen for events from the
browser
Enabled via the Chrome
Debugging Protocol
https://flic.kr/p/5keRVg
Niftiness!
Control flow, back up
element selectors
Extensibility Code export & plugins
https://unsplash.com/photos/ahi73ZN5P0Y
WebDriver: Refreshed!
Friendly Locators, CDP,
& the W3C Protocol
We’re adopting the W3C
WebDriver protocol
It’s already implemented
in Selenium 3.141.59
https://unsplash.com/photos/ywqa9IZB-dU
What does the mean for users? Probably nothing
https://unsplash.com/photos/i55tj_BBwa0
Who Cares About Protocol
Dialects?
“Selenium as a Service”
providers
Stable User-Facing APIs
Drop-in upgrade With caveats
https://unsplash.com/photos/wbx3FeGOEQ0
If it was deprecated It’s probably gone
https://unsplash.com/photos/TW62wXQ6Omc
Legacy wire protocol support
Provided by the java
bindings and legacy jars
https://unsplash.com/photos/CeZypKDceQc
.Net, JS, Ruby, & Python: W3C
only
Even Java will require
you to make extra effort
https://unsplash.com/photos/V862kywlKkw
Does this matter? Probably not
https://unsplash.com/photos/Ar5FGfHXwMU
All third party drivers use the W3C
protocol already
Woohoo!
https://unsplash.com/photos/IuLgi9PWETU
Finding things is hard
The provided “By”
implementations are
limited
https://unsplash.com/photos/yxvRh0C-aVA
Friendly locators: a history Sahi started it
https://unsplash.com/photos/NywSG9q3wC8
Friendly locators
“near”, “above”, “below”,
“left of”, “right of”,
https://unsplash.com/photos/C5XyLljkMrY
Grid: Modernised!
Scalable, Docker,
Observable
Problems with Selenium Grid 2
2011 was a long time
ago
https://unsplash.com/photos/RfAEjh_J6e0
The modern world
Docker, Kubernetes,
AWS, GCP, Azure
https://unsplash.com/photos/rSFxBGpnluw
Zalenium is excellent
Docker and kubernetes
support, nicer UI
https://unsplash.com/photos/eA2t5EvcxU4
Problems with Selenium Grid 2 The selenium codebase
https://unsplash.com/photos/hKVg7ldM5VU
Selenium Grid 4 Because we can’t count
https://unsplash.com/photos/GFpxQ2ZyNc0
Selenium Grid 4 A Fresh Architecture
Router
Node
Session
Map
Distributor
New Session
Selenium Grid 4 A Fresh Architecture
Router
Node
Session
Map
Distributor
Next Command
Selenium Grid 4 Observability
https://unsplash.com/photos/imwaY7KA9qs
So… why the version number bump?
Selenium 4
• A new IDE

• WebDriver

• Same user-facing APIs

• “Only” the W3C WebDriver
protocol

• Grid

• Better suited to the modern
world

• Cleaner code base
https://unsplash.com/photos/ceLRoyy1p9Y
Selenium 4 and BrowserStack
Some history…
Our Products
25,000+ Customers
Will my tests break on BrowserStack?
• No!
• Your tests will continue to work
• But get ahead of the changes. Update your test suite to
use W3C.
Key changes: Standard Capabilities
JSONWire W3C
Key changes: BrowserStack Capabilities
JSONWire W3C
An Example in Java: Using JSONWire
An Example in Java: Using W3C
Another Example in Java: W3C on a real iPhone XS
Tools: Capability Builder
Tools: Code Samples
Any Questions?
https://unsplash.com/photos/AoqgGAqrLpU