I need to retrieve the xpath of element on a page but all I know about the element is that it will contain a certain string let's say "required text" and that it will sit in a div. I would like to search the page for this string and return the xpath to this div.
I have tried something like:
${findXPath} = Get Element Attribute //*[contains(text(),'required text')] xpath
but this returns nothing.