To work with Selenide it is important to find the element, so far we were using firepath along with firebug to inspect the elements but now firebug have become obselete so do firepath, Now automation developers and webpage developers are facing issue with firefox to find xpath and CSS selector
Firefox stopped supporting firebug and firepath, as firepath is just a add on to firebug. On November 14, with the launch of Firefox Quantum (AKA 57), support for old school extensions will stop in Firefox. That means Firebug will no longer work for many developers.
People who were using fireug are in need of an alternative tool to to find xpaths
There are other add ons to overcome firebug isolation, One of the best tool to verify xpath is Try Xpath add on to firefox developed by larissa9839. We are going to learn how to install and how to use try xpath with firefox in step by step manner to use along with Selenide.
Try Xpath is one of the best alternative to firebug. However it may help user to find the xpath, Try Xpath add on's sole purpose to verify whether our xpath is matching with any tool or not.
Advantages of Try Xpath With Selenide :
1. Try Xpath helps users to verify Xpath
2. Try Xpath helps to evaluate CSS selectors
3. If there are more than one matching elements, Try Xpath helps to fucus on the required element using Focus button.
1. Open Firefox latest version(release from FF 57)
2. Click on Open menu /Tools Icon
3. Click on Add ons Options
4. Click on Get More Add Ons option from left Top corner
5. Scroll to to bottom of the page and Choose See More Add ons!
6. Type Try Xpath on search field
7. Click on the Try Xpath Add on
8. User will be navigated to Add on page, now Click add to firefox button
9. Try Xpath Add on will start installing into firefox
10. Give permission to add the Try Xpath
11. If Try Xpath installed without failure, you may see successful message.
1. You can find TX icon in tool bar of firefox, click the icon
2. On Click of the icon, it opens a dialog box which will multiple options such as xpath or CSS(query Selector), input field for value, and the number of matches, expression is corresct or not, result of the mactches
3. Choose Way:Xpath_Any, expression://input[@name='q'] after navigating to google page, hit Enter Key on your keyboard or click Execute button
4 If there is matching element , Try Xpath highlights the element with dashed redline.
5. If there are more elements which matches the xpath, Try Xpath highlights all of them and you can use Focus button to find the right element
(Open Url : https://selenium-webdriver.com/java/practice-dropdowns)
5. You can narrow down the results by giving an index to xpath
1. Choose Way:querySelector, expression:select, hit Enter Key on your keyboard or click Execute button
(Open Url : https://selenum-webdriver.com/java/practice-dropdowns)
2. If there is matching element for the given CSS value , Try Xpath highlights the element with dashed redline.
3. If there are more elements which matches the xpath, Try Xpath will not highlight all of them except the first match
4. If we want to all the matches for the Given xpath, please do change the Way:querySelectorAll, hit Enter after changing the way, Try Xpath will highlight all the matching elements
5. Scroll down the dialog box, to see all th element details
6. With help of Fucus button you hightlight the elements(Blue Solid Line)