I often run into angular elements with custom tags that act like regular elements. Since the tag name doesn't match whats passed in in lib/page-object/platforms/page-object the elements cannot be easily located without passing a block. Instead of
def div_for(identifier)
find_watir_element("div(identifier)", Elements::Div, identifier, 'div')
end
I was thinking something more like
def div_for(identifier)
find_watir_element("div(identifier)", Elements::Div, identifier, identifier[:tag_name] || 'div')
end
would fix the issue.
I often run into angular elements with custom tags that act like regular elements. Since the tag name doesn't match whats passed in in lib/page-object/platforms/page-object the elements cannot be easily located without passing a block. Instead of def div_for(identifier) find_watir_element("div(identifier)", Elements::Div, identifier, 'div') end
I was thinking something more like def div_for(identifier) find_watir_element("div(identifier)", Elements::Div, identifier, identifier[:tag_name] || 'div') end would fix the issue.