Firefox uses Firebug to get XPath and CSS path

Source: Internet
Author: User
Tags xpath

work, often use the location of page elements, commonly used XPath and CSS path two positioning methods.

Here's a quick introduction to using tools to automatically generate an Element's anchor String.

First introduce the use of Firebug and its extended firepath two tools on Mozilla firefox, which can automatically generate positioning strings and verify that the anchor string you edit can match page Elements.

The two tools are as Follows:

How to Use:

  1. Open a webpage, such as www.hao123.com;
  2. Right click on a page Element--use firebug to view the page elements, the mouse click on the top left corner of the Firebug plugin icon or press F12 key, three ways to open the debugging window and enable firebug;
  3. Select the Firepath window;
  4. When you click the button of the mouse arrow pattern in the debug window, you can select the elements;
  5. When an element is selected, an anchor element string XPath or CSS path is automatically generated.

also, The Debug window shows the number of page elements that the anchor string can match, such as:

Used primarily when editing a positional string yourself.

Firefox uses Firebug to get XPath and CSS path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.