Element is found in XPath Checker but not in Selenium

前端 未结 4 633
庸人自扰
庸人自扰 2021-01-14 18:29

I have the following XPath:

//div[contains(@id, \'box\')]/div/h4/small/a[contains(@href, \'google\')]/@href

When I try out this XPath in XP

4条回答
  •  一个人的身影
    2021-01-14 19:21

    Shouldn't that query string look like this (according to javadoc api)?

    "xpath=//div[contains(@id, 'box')]/div/h4/small/a[contains(@href, 'google')]/@href"
    

提交回复
热议问题