我在使用getAttribute方法时出现无效的xpath错误...虽然我能够在firepath中使用相同的xpath来定位图像。在Selenium中使用getAttribute方法时出现无效的Xpath错误
我使用以下方法..
字符串imgAtt = StartServer.browser.getAttribute( “// IMG [含有(@ ALT, '硒IDE标志')]”);
错误:在螺纹
异常 “主” com.thoughtworks.selenium.SeleniumException:错误:无效的xpath [2]:// IMG [含有( 在com.thoughtworks.selenium.HttpCommandProcessor。 throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
你能在上面的语句更新我的XPath ......我没有得到你......当然 – Paras 2013-03-04 19:39:06
@pArAs,看看更新的答案。 – wst 2013-03-04 19:44:22