

The locator is a unique address of an element on the webpage so that your script can find and act on it. Now you if you want to have your script to click on this button, you have to give the locator of the button. You can see Firepath tab on the above screen too. There is no need to go into detail with other tabs which I will go in later chapters. Take your cursor to the desired button or element, do right click and choose “Inspect Element with firebug’ as below.Īs soon as you click on the last option in the above dialog, you will see developer tool open where you can see all HTML code for the web page. Take an example, my application under test is, and I want to click on ‘Add to Cart’ button on the Nexus phone. Now you want to understand about an element like HTML code, XPath, and properties of that target element. Once browser started, you can start using it. To install firepath, you need to do the same as firebug in above steps and restart the browser. Now you can start using firebug.įirepath is firebug extension and adds a development tool to edit and identify XPath or CSS selector of web element. Once Firefox restarts, you will see the following icon in the browser’s add-on area. Make sure you do not have any unsaved changes on any firefox instance opened on your computer. This action may ask to restart your firefox. Add this extension to your Firefox by clicking button ‘Add to Firefox’. You may notice different version of firebug based on your existing firefox version. Start firefox browser, open URL and search for Firebug add-on. Installation Steps: Firefox Users firebug:

Firebug and firepath help you to make your life easier by identifying your target element in your Firefox browser. If you want to click on third menu item out of six on the screen, your mind will tell your hand or finger to move the cursor to that menu item and click but in case of selenium or another test tool, your test code should know that unique location before the click.

Firebug, Firepath, and other developer tools.įirst thing should come to your mind, what are Firebug and firepath and why do I need to learn this? The answer is pretty simple, you should know that what you want to tell your selenium code to perform some action, and where? As a human, you exactly know that where you want to click on the screen or what kind of items you like to interact with.
