开发者

selenium getXpathCount

开发者 https://www.devze.com 2023-02-11 10:20 出处:网络
HI there selenium.getXpathCount does not find element, any one hoas any idea ? Here is my code: if (existArtist){

HI there

selenium.getXpathCount does not find element, any one hoas any idea ? Here is my code:

if (existArtist){
int result = selenium.getXpathCount("//*[@id='chugger-results']/div[1]/ul/li").intValue();
  i开发者_开发技巧f (result>0){

//DO THIS 


Either you have a broken DOM (Do a W3C Validation and see if you have any unclosed tags) or your XPath is looking for an element that doesn't exist.

We would need to see the entire HTML of the page to be able to answer your question (more visibility of your test code would be useful too)

0

精彩评论

暂无评论...
验证码 换一张
取 消