How do I avoid duplicate key warnings in Ruby 2.2 with Watir? -
using watir-webdriver selenium have element selectors duplicate key warnings like
browser.div(class: 'one-possible-class', class: 'another-possible-class')
this works resolve elements match either 1 or both of given classes. problem newer versions of ruby (2.2 , up) throw warnings when different values passed in using same key.
warning: duplicated key @ line 16 ignored: :class
so tried using regex
browser.div(class: /one-possible-class|another-possible-class/)
however, did not work same.
Comments
Post a Comment