Watir 7.3 is now available on RubyGems. Two small features and some maintenance.
To install:
or in your Gemfile:
New Features
Two small feature additions for this release:
DateField
andDateTimeField
can be set with anything responding to#strftime
instead of specific objects.- Cookies can set values for
http_only
andsame_site
Watir and Selenium
Selenium has been churning out releases and making changes over the past year, mostly removing code that Watir doesn’t use, and requiring users to change things to what Watir is already doing. Watir continues to be an effective way to leverage the browser automation power of Selenium with the opinions and synchronization required to more easily maintain your test suites.
Technically, Watir 7.3 only requires Selenium 4.2 or greater (necessary for the new scrolling features), but it is highly recommended that you upgrade to the latest version of Selenium. Selenium 4.11 natively manages drivers better than the webdrivers gem, with more features coming, so you can stop requiring webdrivers and just let Selenium handle it. To keep up with the latest changes in Selenium that are available to Watir users, pay attention to the Selenium blog
Watir and BiDi
The primary functionality in Selenium that Watir has been ignoring so far is related to
BiDirectional /
Chrome DevTools Protocol features.
The CDP implementation in Selenium is a temporary placeholder while the w3c browser tools
working group completes the specification for WebDriver BiDi.
Watir users can access the current features at any time by referencing the Selenium code and using the
Selenium driver which can be obtained by: driver = browser.wd
.
BiDi is the future of browser automation, and the Watir team is keeping a close eye on the state of the technology, and will figure out how best to support these features within the Watir API when they become standardized and as future versions of Selenium (think Selenium 5.0 and 6.0) make more use of them.
See the Changelog for the complete history of updates.