键入x路径后,FirePath不显示HTML代码 [英] FirePath not displaying HTML code after typing x-path
问题描述
在火灾路径文本字段中键入xpath
后,如果x路径正确,则会显示相应的HTML代码.以前运行良好.
Upon typing xpath
in fire-path text field, if x-path is correct then it'll display the corresponding HTML code. It was working fine previously.
但是,即使xpath
是正确的,现在也不会显示相应的HTML代码.
But now it's not displaying the corresponding HTML code even though the xpath
is correct.
有人可以帮我找到解决此问题的方法吗?我什至卸载了fire-path并再次安装,但仍然无法正常工作.
Can anyone help me to find the solution for this problem? I even uninstalled fire-path and installed again but still, it's not working.
推荐答案
如果您访问FirePath
,它明确提到:
If you visit the GitHub Page
of FirePath
, it clearly mentions that :
FirePath is a Firebug extension that adds a development tool to edit, inspect and generate XPath expressions and CSS3 Selectors
FirePath is a Firebug extension that adds a development tool to edit, inspect and generate XPath expressions and CSS3 Selectors
现在,如果您访问 FireBug
的Home Page
提到:
Now if you visit the Home Page
of FireBug
, it clearly mentions that :
The Firebug extension isn't being developed or maintained any longer. We invite you to use the Firefox DevTools instead, which ship with Firebug.next
The Firebug extension isn't being developed or maintained any longer. We invite you to use the Firefox DevTools instead, which ship with Firebug.next
因此明确的方向是我们必须使用与Mozilla Firefox 56.x及更高版本集成在一起的DevTools [F12]
.
So the direction is clear that We have to use DevTools [F12]
which comes integrated with the Mozilla Firefox 56.x + releases onwards.
现在,让我们假设我们必须在Google Home Page
上标识Search Box
WebElement的xpath
.
Now, let us assume we have to identify the xpath
of the Search Box
WebElement on Google Home Page
.
- 打开
Mozilla Firefox 56.x
浏览器并浏览到URLhttps://www.google.co.in
- 按
F12
打开DevTools
- 在
DevTools
部分中的Inspector
选项卡上,使用Inspector
标识Search Box
WebElement. - 复制
xpath
(绝对值)并将其粘贴到文本板中. - 构造一个逻辑唯一的
xpath
. -
在
DevTools
部分中的Console
选项卡上的JS
子菜单中,粘贴以以下格式构造的逻辑唯一xpath
,然后按Enter
/Return
:
- Open
Mozilla Firefox 56.x
browser and browse to the urlhttps://www.google.co.in
- Press
F12
to open theDevTools
- Within the
DevTools
section, on theInspector
tab, use theInspector
to identify theSearch Box
WebElement. - Copy the
xpath
(absolute) and paste it in a text pad. - Construct a logical unique
xpath
. Within the
DevTools
section, on theConsole
tab, withinJS
sub menu, paste the logical uniquexpath
you have constructed in the following format and hitEnter
/Return
:
$x("logical_unique_xpath_of_search_box")
由xpath
标识的WebElement
将被反映.
The WebElement
identified by the xpath
will be reflected.
这篇关于键入x路径后,FirePath不显示HTML代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!