I am trying to make sure I have Element Text visible before I move onto the next step on my test. This is what I have tried:
Element Text Should Be //<span class="quote__summary__level">public liability only</span> Public Liability Only
because the text I want to make sure are visible on the page is Public Liability Only
I have also triend <span class="quote__summary__level">public liability only</span> Public Liability Only
But I am getting this error: InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression //<span class="quote__summary__level">public liability only</span> because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//<span class="quote__summary__level">public liability only</span>' is not a valid XPath expression.
What am I doing wrong please?
This is the element of the text on the website: <span class="quote__summary__level">public liability only</span>
Element Text Should Be xpath://span[@class="quote__summary__level"] public liability only
your locator is incorrect read how to locate element https://robotframework.org/Selenium2Library/Selenium2Library.html#Locating%20elements
Thank you very much for your help. Really appreciate it,