小编Gok*_*kul的帖子

在 XPath 中,父级和祖先有什么区别?

我在 XPath 中看到 2 个不同的轴

  1. 父母
  2. 祖先

ancestor[1]等于parent? IE,

//*[text()='target_text']//ancestor::div[1]
Run Code Online (Sandbox Code Playgroud)

等于

//*[text()='target_text']//parent::div
Run Code Online (Sandbox Code Playgroud)

html xml xpath webdriver

4
推荐指数
1
解决办法
1608
查看次数

标签 统计

html ×1

webdriver ×1

xml ×1

xpath ×1