如何检查元素在硒3.6作为萤火虫不是一个选项更多的FF 56? [英] how to inspect element in selenium3.6 as firebug is not an option any more for FF 56?

查看:85
本文介绍了如何检查元素在硒3.6作为萤火虫不是一个选项更多的FF 56?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一个方法来使用FF的萤火虫。不幸的是它不支持 selenium 3.6 。如果要找到元素,可以做些什么,检查元素就足够了?



如果我认真考虑使用较低版本的selenium,会有帮助吗?

解决方案

如果您访问 GitHub Page > FirePath ,它清楚地提到:



现在,如果您访问主页



$


Firebug扩展程序不再被开发或维护。我们邀请您使用FireFox.next附带的Firefox DevTools


因此,我们必须明确指出我们必须使用集成Mozilla Firefox 56.x +版本的 DevTools [F12] xpath code> Search Box WebElement on Google主页


  1. 打开 Mozilla Firefox浏览器56.x ,浏览到URL https://www.google.co.in

  2. F12 打开 DevTools

  3. DevTools Inspector 标签上,使用 Inspector 标识搜索框 WebElement。

  4. 复制 xpath (绝对)并将其粘贴到文本板中。
  5. DevTools中构建一个逻辑唯一的 xpath JS 子菜单中的控制台选项卡上,粘贴逻辑唯一 xpath 你已经按照以下格式构造,并且按下 Enter / Return

      $ x(logical_unique_xpath_of_search_box)


  6. xpath 标识的 WebElement 会被反映出来。



I am trying to find a way to use firebug for FF. Unfortunately it's not supported for selenium 3.6. What can be done if I have to locate the elements, will "Inspect" element will be sufficient?

If I get down to less version of selenium, will that help?

解决方案

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

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

So the direction is clear that We have to use DevTools [F12] which comes integrated with the Mozilla Firefox 56.x + releases onwards.

Example Usage :

Now, let us assume we have to identify the xpath of the Search Box WebElement on Google Home Page.

  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")
    

  7. The WebElement identified by the xpath will be reflected.

这篇关于如何检查元素在硒3.6作为萤火虫不是一个选项更多的FF 56?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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