Firebug as well as FirePath add-ons of Firefox browser are playing major business office to popular off the XPath as well as CSS path of whatever chemical component easily as well as quickly. Earlier nosotros learnt how to purpose firebug as well as firepath improver alongside Firefox browser to popular off XPath or CSS of whatever chemical component In THIS POST. Now supposing I request both
these add-ons In Firefox Driver Instance when I move my examination using selenium WebDriver FirefoxDriver Instance. Is It possible? Yes - Let's come across how tin privy nosotros work It. As y'all know, It Is launching Firefox browser Instance alongside fresh profile every fourth dimension when y'all execute selenium WebDriver test. So Firebug as well as FirePath volition endure non available In that fresh created profile of WebDriver FirefoxDriver Instance. Bellow given steps volition add together Firebug as well as FirePath In WebDriver FirefoxDriver Instance for you.
Download .xpi files of Firebug as well as FirePath add-on
First of all nosotros request to download .xpi files of Firebug as well as FirePath improver as well as hence nosotros volition attach both these files alongside WebDriver FirefoxDriver Instance profile during examination execution.
Download latest .xpi file of Firebug
You request Google Chrome or Internet Explorer browser to download .xpi file.
- Open Google Chrome browser.
- In Google Chrome browser, Go to Firebug improver DOWNLOAD PAGE.
- Click on "Download Now" push on Firebug improver download page every bit shown In bellow Image.
- Click on "download anyway" link every bit shown bellow. It volition download .xpi file of firebug.
Download latest .xpi file of Firebug
- Open Chrome browser.
- In Chrome browser, Go to Firepath add-on DOWNLOAD PAGE.
- Click on "Download Now" push as well as hence click on "download anyway" link. firepath's .xpi file volition endure downloaded.
Current latest version of firebug Is 2.0.10 as well as firepath Is 0.9.7.1.1 so downloaded file volition endure "firebug-2.0.10-fx.xpi" as well as "firepath-0.9.7.1-fx.xpi". Firebug as well as FirePath versions tin privy endure alter In hereafter hence file advert volition endure unlike In hereafter based on version.
Put firebug as well as firepath .xpi files In D: drive.
Create as well as move WebDriver examination alongside firebug as well as firepath add-on
Now nosotros tin privy launch FirefoxDriver Instance alongside firebug as well as firepath add-on. We volition work custom FirefoxDriver profile on move fourth dimension as well as hence attach both these add-ons alongside that custom profile. So novel launched FirefoxDriver Instance volition accept firebug as well as firepath add-ons.
Execute bellow given examination In your eclipse as well as verify firefox driver Instance Is launched alongside firebug as well as firepath add-ons or not.
package Testing_Pack; import java.io.File; import java.io.IOException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; populace cast Firebug { populace static void main(String[] args) throws IOException { // Set Firebug as well as Firepath xpi file's path. // Note : both file's advert as well as path should endure proper. Please verify It twice. File firebug_path = novel File("D:\\firebug-2.0.10-fx.xpi"); File firepath_path = novel File("D:\\firepath-0.9.7.1-fx.xpi"); // Create firefox driver Instance profile. FirefoxProfile firefoxprofile = novel FirefoxProfile(); // Add Firebug improver to novel created profile of Firefox browser. firefoxprofile.addExtension(firebug_path); // Add FirePath improver to novel created profile of Firefox browser. firefoxprofile.addExtension(firepath_path); // Pass novel created Firefox profile to the FirefoxDriver instance. WebDriver driver = novel FirefoxDriver(firefoxprofile); driver.get(" "); } }
When I move to a higher house test, my firefox driver Instance Is launched alongside firebug as well as firepath add-ons every bit shown In bellow Image.
This agency y'all tin privy purpose firebug as well as burn path improver move fourth dimension to popular off XPath of whatever chemical component when y'all move your tests. THIS POST volition exhibit y'all how to popular off xpath or CSS path using firebug as well as firepath.