You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An exception occurs when checking if a following sibling exists:
class MyPage
include PageObject
div(:abc, id: 'abc')
end
page = MyPage.new(browser)
page.abc_element.following_sibling.present?
#=> C:/Ruby23/lib/ruby/gems/2.3.0/gems/watir-6.16.5/lib/watir/elements/element.rb:798:in `rescue in element_call': timed out after 2 seconds, waiting for #<Watir::HTMLElement: located: false; {:id=>"abc", :tag_name=>"div"} --> {:adjacent=>:following, :index=>0}> to be located (Watir::Exception::UnknownObjectException)
#=> from C:/Ruby23/lib/ruby/gems/2.3.0/gems/watir-6.16.5/lib/watir/elements/element.rb:815:in `element_call'
#=> from C:/Ruby23/lib/ruby/gems/2.3.0/gems/watir-6.16.5/lib/watir/elements/element.rb:791:in `rescue in element_call'
#=> from C:/Ruby23/lib/ruby/gems/2.3.0/gems/watir-6.16.5/lib/watir/elements/element.rb:815:in `element_call'
#=> from C:/Ruby23/lib/ruby/gems/2.3.0/gems/watir-6.16.5/lib/watir/elements/element.rb:123:in `tag_name'
#=> from C:/Ruby23/lib/ruby/gems/2.3.0/gems/page-object-2.2.5/lib/page-object/elements/element.rb:185:in `pageobject_wrapper'
#=> from C:/Ruby23/lib/ruby/gems/2.3.0/gems/page-object-2.2.5/lib/page-object/elements/element.rb:97:in `following_sibling'
The text was updated successfully, but these errors were encountered:
An UnknownObjectException occurs when:
For example, given the following page, where the
div
does not have a following sibling:An exception occurs when checking if a following sibling exists:
The text was updated successfully, but these errors were encountered: