cheezy / page-object

Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver
MIT License
653 stars 220 forks source link

Support custom angular elemnts #503

Closed deibele1 closed 3 years ago

deibele1 commented 3 years ago

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.