|
| 1 | ++++ |
| 2 | +Description = "In the second post in this series, Simon Stewart continues talking about what's coming in Selenium 4 and why this release has a major version bump." |
| 3 | +Title = "What’s Coming in Selenium 4: Why The Major Version Bump?" |
| 4 | +Date = 2020-11-10 |
| 5 | +Author = "shs96c" |
| 6 | +AuthorLink = "https://twitter.com/shs96c" |
| 7 | +tags = ["selenium"] |
| 8 | +categories = ["general", "releases"] |
| 9 | ++++ |
| 10 | + |
| 11 | +>In the second post in this series, Simon Stewart continues talking about |
| 12 | +>what's coming in Selenium 4 and why this release has a major version bump. |
| 13 | +
|
| 14 | +In my [last post](https://www.selenium.dev/blog/2020/what-is-coming-in-selenium-4-how-can-i-contribute/), |
| 15 | +I shared a bit about how the Selenium project works overall. Now, let’s start talking about Selenium 4 |
| 16 | +and what’s coming. One thing I think I should clear up is "why the major version number bump?" |
| 17 | + |
| 18 | +Sometimes I joke that the major reason for the version number bump is that while the digits of Pi are |
| 19 | +infinite, when we went from 3.14 to 3.141, people got a little bit upset. Moving to 3.141.5 and then |
| 20 | +3.141.59 was as far as we wanted to push that particular idea :) |
| 21 | + |
| 22 | +More seriously, the first reason is that we have a revised Selenium IDE. Years ago, this used to be |
| 23 | +Firefox only because it used the XPI extension mechanism (which was specific to Firefox). It’s now a |
| 24 | +web component, and you can download it for Chrome, Firefox, and anything else that supports Web |
| 25 | +Components. There is currently work to rewrite it as an Electron app, which will allow us to make |
| 26 | +better use of the native OS the IDE is running on. That work was largely pushed forward by developers |
| 27 | +working at Applitools. They started from a base of the original Selenium IDE that had been migrated |
| 28 | +to use Web Components by a company called SideX. It’s been a fantastic example of the community |
| 29 | +working together well. |
| 30 | + |
| 31 | +Secondly, we have fully adopted the W3C WebDriver protocol, and have dropped support for the original |
| 32 | +home-grown wire protocol. The way that Selenium communicates with a web browser is via a wire protocol |
| 33 | +that’s effectively just JSON over HTTP. Originally this grew organically as we figured things out, |
| 34 | +and we tried to make browsers do what we needed them to. That original protocol is known as the JSON |
| 35 | +wire protocol because it spoke JSON over the wire (and we’re not great at coming up with very original names). |
| 36 | + |
| 37 | +That original protocol was the base for the W3C WebDriver protocol, which smoothed some of the rough |
| 38 | +edges, and brought some much needed consistency to the protocol. The two major areas the standardised |
| 39 | +protocol improved on included session creation, where we removed considerable ambiguity, and by providing |
| 40 | +a far richer API for specifying user actions. |
| 41 | + |
| 42 | +So what does this adoption of the W3C protocol mean for you? I'll be honest: it probably doesn’t mean |
| 43 | +much to you at all. If you're using a modern browser (released over the past couple of years), you will |
| 44 | +find that actually you already speak the W3C protocol with Selenium 3. |
| 45 | + |
| 46 | +So who does care about the protocol dialects? When we talk about companies like Sauce Labs who provide |
| 47 | +Selenium as a service—they care about it. The ecosystem is ready for this next step, because the |
| 48 | +technical folks at these companies have ensured that they understand and comply with the W3C protocol, |
| 49 | +and folks from the Selenium project have been there offering help and advice as needed. |
| 50 | + |
| 51 | +One of the other nice things about Selenium 4 is that we've done our best to ensure a stable user-facing |
| 52 | +API. That means when you upgrade your project from Selenium 3 to Selenium 4, it should be a drop-in |
| 53 | +upgrade. You just change the version number, recompile and you should be done. |
| 54 | + |
| 55 | +There are a few caveats that you should be aware of, however! The major one is that if in the last version |
| 56 | +of Selenium 3 a method was deprecated, it’s now probably gone. We’ve taken the opportunity of a major |
| 57 | +version bump to delete them and clean up the behind-the-scenes internals people don’t normally get to see. |
| 58 | +If you’re a software developer, you may recognise this as us paying off some of our technical debt :) |
| 59 | + |
| 60 | +Stay tuned for the next post, where I’ll go over some new tricks in Selenium 4. |
| 61 | + |
| 62 | +*This was originally posted at https://saucelabs.com/blog/whats-coming-in-selenium-4-why-the-major-version-bump* |
0 commit comments