Open jkotests opened 5 years ago
Verified with Page-Object v2.2.5 and Watir v6.16.5. From code inspection, would have existed since Page-Object v2.2.3.
The problem appears to be in the pageobject_wrapper:
def pageobject_wrapper(watir_object)
type = element.type if watir_object.tag_name.to_sym == :input
cls = ::PageObject::Elements.element_class_for(watir_object.tag_name, type)
cls.new(watir_object.to_subtype)
end
Notice that we are retrieving the type
of the base element
rather than the watir_object
.
For example, given the following page, which has an
input
adjacent to adiv
:An exception will occur when trying to get the adjacent elements: