【问题标题】:Extract XPath and Run it in google chrome提取 XPath 并在谷歌浏览器中运行它
【发布时间】:2019-09-27 03:25:08
【问题描述】:

当我尝试使用以下代码从 google chrome 控制台测试 xpath 时,网页中有下拉列表:

$x("//*[@id="searchResultsList"]/li[2]/div/div/div/pagination-component/div[1]/div[4]/span[2]/select/option[4]")

我看到以下错误

Uncaught SyntaxError: missing ) after argument list

但我认为我的语法是正确的

【问题讨论】:

    标签: google-chrome xpath console syntax-error


    【解决方案1】:

    试试这个,你的字符串格式不正确。

    $x("//*[@id='searchResultsList']/li[2]/div/div/div/pagination-component/div[1]/div[4]/span[2]/select/option[4]")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-21
      • 2012-04-03
      • 2017-09-25
      • 2020-09-27
      • 1970-01-01
      • 2011-06-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多