The visible attribute cannot be used as a condition in xpath expressions: //*[@visible='true' or @visible='false'] will never locate any element using inspector or java client code.
Appium inspector locator is able to locate non visible elements while programatically (java client in my case) you cannot locate non-visible elements with a findElements instruction. The following xpath would locate the element described above using Appium’s inspector but java-client findElement function throws a timeout exception: //*[@label='mytext']
How is the correct way to handle visible=false elements?
Hi @hamena, did you resolve this issue?
For some ‘invisible’ elements, I can find them and click on the elements, but still cannot find and click on some ‘invisible’ elements. I do not know the reason
Hope you can give me some advice