I am trying to locate a UI popup using xpath and inner text. The popup html is like this:
Hello ? {some elements} What would you like to do today {more elements} Play or Die ? {Yes button, No button}.
I want to get this element by using something like this:
//div[contains(@innerText, 'Hello ? What would you like to do today Play or Die ?')]
How do I do this ? Or is there a better way to find this popup ? There are no Ids or permanent classes here. Moreover the DOM structure is variable.