Watir 6.9 Released!

Written by: Titus Fortner on November 18, 2017

Watir 6.9.0 is now available on RubyGems! Several minor features and bug fixes from several new committers.

To install:

gem install watir

or in your Gemfile:

gem "watir", "~> 6.9"


Updates

  • Element#flash had some browser compatibility issues with white backgrounds that has been fixed
  • Firefox updated to the latest W3C supported Alert exceptions which Watir did not previously handle
  • When working with multi-select lists, #select and #select_all will now accept an array of multiple options:
browser.select_list(name: "new_user_languages").select(["Danish", "Swedish"])
  • The new Element#set! method can now handle multiple inputs. Note that the key combinations that are available in Element#set are still not supported
  • Mozilla has also implemented a headless mode for Firefox, and it can now be accessed just like Chrome:
Watir::Browser.new :firefox, headless: true
  • Cookies now now be set by String instead of just by Time:
browser.cookies.add 'foo', 'bar', {expires: (Time.now + 10000).to_s}
  • The generic Browser#element and Browser#elements methods can now take advantage of the new class locators:
browser.element(class: ["a", "!c", "b"])
  • If an element can not be located, and the page contains IFrames, Watir will append a note to the error message to: “Maybe look in an iframe?”


See the Changelog for the complete history of updates.

Tags: