我在使用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