In a page object file:
class ThisPage
include PageObject
I can establish an object like this:
div(:user_dialog, :class => 'ud_dialog')
However, in the domain of the website, there are many windows with :class => 'ud_dialog'
that popup in various workflows.
I can get to the object in binding.pry like this:
on(ThisPage).div_elements(:text => 'Are you sure you want to do this action?').first.parent.html
How can I establish the window like this in the page file?
i.e. is there some syntax like this:
div(:user_dialog, parent(:text => 'Are you sure you want to do this action?'))