unobtainium-multiwait
This gem provides a driver module for unobtainium allowing for more easily finding (one of) multiple elements.
To use it, require it after requiring unobtainium, then create the any driver with a Selenium API:
require 'unobtainium'
require 'unobtainium-multiwait'
include Unobtainium::World
driver.navigate.to('http://finkhaeuser.de')
elems = driver.multiwait({ xpath: '//some-element' },
{ xpath: '//other-element' },
timeout: 10)
# Entries will be nil if nothing is found by these xpaths before the
# timeout expires.
puts elems.length # => 2