I am trying to use the explicit locator strategy in the Selenium Robot library to find an element:
Click Element xpath://*[@id="sidebar-nav"]
I can locate the element using this xpath on the web console, but when I run my Robot test I'm getting an element not found error. I haven't been able to locate it using css either. What am I doing wrong?
It's usually one of two things:
If you need to add waits, use things like
Wait Until Element Is Visible
Wait Until Element Is Not Visible
Wait Until Page Contains Element
Wait Until Page Does Not Contain Element
See the docs, https://github.com/robotframework/HowToWriteGoodTestCases/blob/master/HowToWriteGoodTestCases.rst#avoid-sleeping