/ 详情

Chrome获取XPath的方法

Backlog
owner
Opened this issue  
2017-11-08 15:41

先按键盘F12,打开开发者工具面板,然后分两个步骤:

1. 获得xpath:切换到Elements选项卡,右键某个DOM节点,在弹出的面板中选择Copy->xpath
2. 验证xpath:切换到Console,手动敲入 $x('这里写你获取到的xpath'), 然后在单引号里面粘贴上个步骤获取到的xpath,按回车,执行该代码后可以得到结果,以此来验证xpath

如图:
输入图片说明

Comments (0)

自风 created 任务
自风 added label question
自风 updated Top Level: High

Sign in to comment

状态
Assignees
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(1)
117 l weiwei 1578913730