Firepath For Firefox

  1. Firepath Addon Firefox
  2. Firebug Addon Download
Firefox

Firepath and Firebug are very useful and powerful Firefox add-ons that could be use to inspect and generate XPath 1.0 expressions. Before using them, you need to install them in Mozilla Firefox browser. Make your Mozilla Firefox browser open and active, and then follow the steps to install firebug and firepath. How to install Firebug. ChroPath generates all possible selectors just by one click. ChroPath can also be used as Editor for selectors. It makes easy to write, edit, extract, and evaluate XPath queries on any webpage. 2-Search for the FirePath plugin and click on the “Add to Firefox” button. Downloading FirePath Add-on in FireFox. 3- After clicking the add option, the FirePath installation dialog will open as shown below.

Install FireBug Addon for Firefox

Firebug (Firefox Add-on) is a web development tool that facilitates the debugging, editing and monitoring of any website’s CSS, HTML, DOM and JavaScript. In Selenium, Firebug is used to inspect the UI elements of the web application under test.

How to Install Firebug ?

Please follow the below steps for installing the Firebug Addon for Firefox Browser:

  1. Verify that a Firefox is instead in your system else download it from http://www.mozilla.org/en-US/firefox/new/ and read the version of the Browser from About Firefox in Help menu.
  2. Launch the Firefox Browser and browse for https://getfirebug.com/downloads . Then, select the Stable FireBug version which is compatible with your Firefox Browser version installed in Step#3 and click on ‘Download’ link
  3. Ensure that Firefox ADD-ONS page is displayed with ‘FireBug’ add-on and click on ‘Add to Firefox’ button to install the ‘FireBug’ add-on.

4. Click on ‘Install Now’ button on the displayed Popup Window.

5. After Installation restart (i.e. close and reopen) the Firefox Browser.

6. Ensure that FireBug icon is displayed on the FireFox Browser Window as shown in the below screenshot:

Firepath Addon for Firefox

Before explaining how to install Firepath, I would like to explain why Firepath is used in Selenium Test Automation. Firepath is used to create the CSS and XPath locators to locate the UI elements of the Web Application Under Test.

How to Install Firepath ?
1. Open Firefox browser and access https://addons.mozilla.org/en-US/firefox/addon/firepath/2. Ensure that Firefox Add-ons page is displayed with Firepath Add-on

3. Click on ‘Add to Firefox’ Button to download the Firepath Add-on

4. Ensure that a Popup dialog is displayed and click on ‘Install Now’ button on the displayed dialog

5. Restart (i.e. Close and Reopen) the Firefox Browser after Firepath is installed

6. Click on FireBug icon on the top right side of the page as shown below:

7. Ensure that Firepath tab is now displayed in the FireBug interface after installing Firepath as shown below:

How to use FireBug and Firepath

Firepath Addon Firefox

1. Launch Firefox Browser and browse any site say www.google.com
2. Press F12 key or click on the ‘FireBug’ icon on the Firefox Browser
3. Ensure that the FireBug options gets displayed as shown below

4. Click on the ‘Inspect Element’ option of the FireBug as shown below, select any UI element on the page say ‘Google Logo’ and ensure that the source code of the selected UI element (i.e. Google Logo in this example) is highlighted as shown below

5. Observe that the above highlighted source code is in html format. We may need this source code to identify the properties of the selected UI element (i.e. Google Logo in this example)

6. For example if we want to know the id property details of the selected UI element Google Logo. First we need to inspect the Google Logo by following the above 4 steps and copy the ‘id’ details from the highlighted source code as shown below7. Click on the ‘Firepath’ tab to find out the Xpath value of the inspected element (i.e. Google Logo in this example) as shown below:

8. Ensure that ‘Xpath’ property value of the selected UI element (i.e. Google Logo) is displayed by default as shown below:

9. Click on the Dropdown field as shown below and select ‘CSS’

10. Ensure that ‘CSS’ property value of the inspected UI element (i.e. Google Logo) is displayed as shown below

Firebug Addon Download

11. You can Copy the ‘CSS’ Selector property value in Step 10 or ‘XPATH’ Selector property value in Step 8 of the inspected element.