键入x路径后,FirePath不显示HTML代码 [英] FirePath not displaying HTML code after typing x-path

查看:138
本文介绍了键入x路径后,FirePath不显示HTML代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在火灾路径文本字段中键入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.

推荐答案

如果您访问GitHub Page,则为rel ="nofollow noreferrer"> strong> 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.

  1. 打开Mozilla Firefox 56.x浏览器并浏览到URL https://www.google.co.in
  2. F12 打开DevTools
  3. DevTools部分中的Inspector选项卡上,使用Inspector标识Search Box WebElement.
  4. 复制xpath(绝对值)并将其粘贴到文本板中.
  5. 构造一个逻辑唯一的xpath.
  6. DevTools部分中的Console选项卡上的JS子菜单中,粘贴以以下格式构造的逻辑唯一xpath,然后按Enter/Return :

  1. Open Mozilla Firefox 56.x browser and browse to the url https://www.google.co.in
  2. Press F12 to open the DevTools
  3. Within the DevTools section, on the Inspector tab, use the Inspector to identify the Search Box WebElement.
  4. Copy the xpath (absolute) and paste it in a text pad.
  5. Construct a logical unique xpath.
  6. Within the DevTools section, on the Console tab, within JS sub menu, paste the logical unique xpath you have constructed in the following format and hit Enter/Return:

$x("logical_unique_xpath_of_search_box")

  • xpath标识的WebElement将被反映.

  • The WebElement identified by the xpath will be reflected.

    这篇关于键入x路径后,FirePath不显示HTML代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆