我已经尝试了下面的定位器,但没有用: //div[@id="SidebarContent"]//a[@href='/catalog/categories/BIRDS'] 请帮我找出正确的定位器。网址:This is the URL 以下是用户名和密码: username:Testing
Password:test@123
我可以用try/catch包围它,如果我捕捉到一个异常,比如“没有找到预期的元素”,我可以返回null;但是我想首先验证xpath的语法。例如,这里有一个无效的xpath:"//span[contains(@id,'ThisWillNEverBeFound" for obvious reasons of no closin