There is a lot of confusion about the WebDriver W3C standard: what does it mean, what do I need to do, and how urgent is it? Marcus will cover several steps you need to take in order to stay up-to-date with the latest version, as well as some of the history the project has gone through, which led to this historic standard. Code will be made simple, examples will be shown, and myths will be dispelled.
10. WHAT’S THE DIFFERENCE?
10
You came here for a Latin lesson, right?
De facto—“In fact”
True for practical reasons or consensus:
“most of us think this is a great idea!”
De jure—“In law”
A formal, official status or agreement:
“this is now codified as a requirement”
“This test tool seems to work better than
the others. Let’s use it!”
“The browser vendors have now agreed
to unify how Selenium is implemented”
@mmerrell
11. BEFORE THE EARTH COOLED
● Initially developed to test a time & expense system
● Selenium debuted in 2004
● WebDriver followed in 2007
● Projects combined in 2008
● HP was still “king”
● Selenium took advantage of certain “common interfaces”
within the browser
○ Injected JavaScript into the responses coming back
from the server
○ Server-side socket in Firefox was left open from
experiments with Distributed XPCOM
● Browser vendors/developers barely knew these things
existed
@mmerrell
12. A FORCE THAT COULDN’T BE IGNORED
12
As Selenium/WebDriver merged and slowly gained critical mass,
legacy testing tools disappeared
Browser vendors took notice
@mmerrell
13. SELENIUM EMERGES AS THE STANDARD
13
2012
Proposal
Working Group
forms
2018
Recommendation
Adoption in
principle
2016
Editor’s Draft
Specifics take
shape
2019
Selenium 4
Full adoption of
the standard
@mmerrell
14. THE STANDARD
14
● The web is different now
● Infrastructure is different now
● For many years there was a real risk that this whole thing could be
“shut down” by Google, Microsoft, Mozilla, Apple
● Going from “hack” to “standard”
● The “connective tissue” between Selenium and the browser is now
maintained by a standards committee, collaborating with the experts
who created the browser
The W3C github repo is the meeting point between the Selenium Project
and the browser vendors.
@mmerrell
15. IN A PERFECT WORLD
15
● All at once:
○ Selenium 4 is released
○ All browsers work with Selenium 4 immediately
○ Everyone updates their capabilities
○ Legacy code is deleted
○ We hold hands and sing
@mmerrell
16. REALITY IN EARLY 2019
16
● We’re close
● Jim Evans’ Tweet stream on overall compliance
● You still have to set an “experimental” flag to enable
W3c with Chrome
● Undiscovered bugs all over, no doubt
● Safari is behind (48% compliance)
@mmerrell
17. WHY SHOULD I SWITCH NOW?
17
● To utilize the newest browsers
● To stay ahead while you still have control
● Browser vendors will start turning off support for the “legacy”
protocol shortly after Selenium 4 is released
● If you’re using the legacy version, you will be “stuck in time” on
older versions of the browsers/drivers
● Be the leader in your org by using the most up-to-date
technology
● Go have a look! It’s open-source and ready for engagement!
https://github.com/w3c/webdriver @mmerrell
19. WILL MY TESTS STILL RUN?
19
● In short, yes!
● Switching now gives you:
○ Full advantage of W3C capabilities
○ Future proof your tests against
incompatibility issues
● There will be bugs
● REPORT THE BUGS
@mmerrell
24. SLIGHT CHANGES TO CAPABILITIES
24@mmerrell
platform platformName
browser browserName
version browserVersion
DesiredCapabilities.chrome() ChromeOptions
Last intended version of Selenium 3x is 3.141.59
25. WHAT’S NEXT?
25
• Follow the progress of the Selenium 4 release!
https://github.com/SeleniumHQ/selenium/projects/2
@mmerrell
39. SPECIAL THANKS
● Alyssa Lydon
● Samantha Coffman
● Jim Evans
● Jason Huggins
● Simon Stewart
● Dave Haeffner
39@mmerrell
40. NEED SOME MORE INFO ON SELENIUM 4?
• Selenium State of the Union - SeConf India
• Blog post - DZone
• SeleniumHQ - Selenium Documentation
40@mmerrell
Editor's Notes
The web is different - JavaScript, dynamic everything, analytics
Infrastructure is different - Cloud, Docker, Kubernetes