开发者

Selenium Getxpathcount returns 0

开发者 https://www.devze.com 2023-03-17 14:58 出处:网络
Selenium.GetXpathCount(\"xpath=/html/body/form/div[2]/div[3]/div[3]/table\") returns 0. I used Firepat开发者_运维问答h to find /html/body/form/div[2]/div[3]/div[3]/table, and it showed me 20 matching

Selenium.GetXpathCount("xpath=/html/body/form/div[2]/div[3]/div[3]/table") returns 0.

I used Firepat开发者_运维问答h to find /html/body/form/div[2]/div[3]/div[3]/table, and it showed me 20 matching nodes.

Am I syntatically correct in getting the xpath count above?


Remove xpath= from the start of your expression.

See the documentation here, which indicates that no such prefix is necessary:

  • http://www.seleniumwiki.com/tag/getxpathcount/
0

精彩评论

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