Sauce Labs Work
I’m still on paternity leave, so I’m still not doing any Sauce Labs specific work.
Selenium 4.2 Work
I’ve written a ridiculous amount of code the past 4 months (more than my annual average over the past 5 years). I’m not sure how long I’ll be able to keep up this pace.
As I mentioned in my November recap, the main feature of Selenium 4.2 is supposed to be adding all the new W3C-specified Actions functionality, including scroll wheel support. Except the Selenium devs are not going to have everything implemented in all the languages before Chrome 97 is released, so we’re probably going to need to do language-specific patch releases to support it. If we want to keep functionality synchronized between the different bindings, while still keeping up with Chrome releases, we might be better off with feature branches than with trunk-based development.
One of the challenges is that the current implementations of the Actions class work very well for just a default keyboard and a default mouse. W3C added support for creating additional pointer types (like stylus or touch pad, etc), but an easy API for users to take advantage of this functionality was not added in most languages. Ruby and Python manage this by allowing you to optionally specify the device name for any action, which is nice. In Java and .NET, though, this would double the number of methods. I proposed the idea for Java to let the user create the pointer input desired, then set it as active. That may or may not be the best approach, but it would also work with .NET.
I did overhaul the Ruby code to simplify some things and to make some other things more obvious with better defaults and errors. The Python code could use more tests, but the implementation looks good.
One of the additions to the W3C was support for pointer events.
These properties are supposed to be generic to any pointer, but are most easily understandable
in the context of a pen or stylus (e.g., how much pressure, what angle are you holding it at).
Because there are so many (9!) of these properties, though,
they are much easier to support in the dynamically typed languages than the strict ones.
David implemented the Python ones with
kwargs, and I did the Ruby ones with
I proposed solutions requiring the creation of a new class for
.NET that are waiting for the other devs to agree to.
We made great progress on the Selenium documentation this month.
Selenium has an official translation team. They’ve been doing lots of great work already, and we’ve archived the inactive languages for now.
The documentation taxonomy has been really haphazard. I went through and:
- Removed things from top level that aren’t core products or main groupings of content
- Shortened the link names, and consolidated/nested similar content
- Removed translations that aren’t being maintained
You can see the difference pretty easily (hover over image to enlarge):
So far I’ve rewritten:
- Install a Selenium library
- Install browser drivers
- Element Actions (proposed)
- Writing your first Selenium script
A lot of these articles are going to need updated code examples to be useful. We could really use some help with basic examples in our documentation if your New Year’s resolution includes contributing to an open source project.
We’re working to move the user-applicable content away from our wiki and into the docs, and keep the wiki pages for Selenium authors. There were 65 wiki pages, and so far I’ve moved about 1/3 of them, have PRs outstanding for another 1/3, and we have to figure out what we’re doing with the other 1/3.
Upcoming Website Articles
I’d really like to be able to do 3 articles a month in 2022 — a recap, a technical article, and a theory article. If my history is anything to go by, this will be a major challenge for me.
- Writing about the Test Pyramid was by far the most popular choice in last month’s poll, so expect that article to be posted later this month or early February. I had it in a final draft form last year, then decided there were some things that needed to be re-researched so I pulled it. I’m looking forward to sharing the idea.
- I also have a .NET specific article completed about how to execute browser specific functionality on the Remote WebDriver in Selenium 4.1.
- I have some updated content for my Shadow DOM article that I’ll post soon.
Of these articles that I’ve partially written, which one would you most like me to finish and post? I’ve included two theory and two technical options:
- Selenium is not a Testing Tool
- Dom to Database Tests vs Journeys
- Working with Cookies in Selenium
- Scrolling in Selenium
- Sauce Labs: Going back to work, getting back to Sauce Bindings
- Selenium Code: We need to get this Actions class stuff delivered
- Selenium Docs: Transfer the rest of the wiki articles and figure out a better way to do code examples
- Watir: I’ll make a 7.2 release with the Shadow DOM support
or answer one of these questions in the comments or on Twitter: