In the last guide, we talked about how to develop automated testing scripts by leveraging the recording utility in Selenium IDE. We also emphasized the striking capabilities of Selenium IDE. The goal was to familiarize readers with essential aspects and commands of Selenium IDE.
A quick reminder – this is the 4th guide in our complimentary Selenium training series.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
Now that you’ve learnt how to create automated scripts with the recording function of Selenium IDE, let’s shift our focus to another important tool that aids in the generation of effective test scripts: Firebug. Firebug aids in examining the properties of web elements and web pages.
Thus, this guide concentrates on the installation of Firebug and understanding its functions.
Bear in mind that the content of this guide is relevant not only to Selenium IDE but all tools in the Selenium suite. Hence, I will use the term “Selenium” instead of “Selenium IDE”.
In this guide, we’ll learn how to employ the Firebug add-on for generating Selenium scripts. We will also discuss the installation procedure of Firebug.
What This Guide Covers:
Introduction to Firebug
Firebug is an extension for Mozilla Firefox. It aids in investigating HTML, CSS, and JavaScript elements on a webpage. It enables us to uniquely identify the elements on a webpage, which we can locate based on their locator types, to be discussed later in this guide.
How to Install Firebug?
For smooth comprehension, we will break down the installation process into the following steps.
Step -1: Open the Mozilla Firefox browser and go to this Firebug add-on download page. This URL will take us to the Firefox add-ons area.
Step -2: On the webpage, click the “Add to Firefox” button. Refer to the following figure for guidance.
Step-3: As you click on the “Add to Firefox” button, a security alert box will show up. Click the “Allow” button.
Step-4: Firefox starts downloading the background add-on, and a progress bar will appear.
Step-5: Upon completing the download, a software installation window pops up. Press the “Install Now” button.
Step-6: Upon successful completion of the installation, a notification appears stating that Firebug has been successfully installed and can be closed.
Note: Unlike Selenium IDE, Firebug installation does not require reloading of Firefox. It can be employed instantly.
Step-7: To launch Firebug, any of these methods can be utilized:
- Press F12
- Select the Firebug icon in the top-right section of the Firefox window.
- In the Firefox menu bar, select Web Developer -> Firebug -> Open Firebug.
Step-8: Firebug will now display at the Firefox window’s bottom.
After successfully downloading and installing Firebug, we’ll delve into the kinds of locators we can construct utilizing Firebug.
Constructing Selenium Script via Firebug
Differing from Selenium IDE, Firebug mandates us to manually write automated test scripts by appending multiple test maneuvers to constitute a logical and coherent test script.
Let’s follow a methodical procedure to comprehend the process.
Scenario:
- Open “https://accounts.google.com”.
- Verify the title of the application.
- Type an incorrect username and password, and submit the information for login.
Step 1 – Launch Firefox and open Selenium IDE from the menu section.
Step 2 – Fill in the address of the application to test (“https://accounts.google.com”) in the Base URL textbox.
Step 3 – The Record button is ON by default. Make sure to toggle it OFF, thus disabling the recording mode. If the recording mode is ON, it might capture our interactions with the web browser.
Step 4 – In Firefox, open the application to be tested (“https://accounts.google.com”).
Step 5 – Activate Firebug in the web browser.