Save Firepath ( Firebug plugin ) result - firefox

i m using Firepath, a firebug extension for Firefox browser.
How to show/save the result, example: want to grab all link in pages.
there will be list of links in firepath window.
Thank you

Andy,
I have tried to do the same thing you are doing and I couldn't find a way to do this with Firepath.
However I did find a tool in Chrome XPath Helper that allows you to copy your results. This did the trick for me, hope it works for you and everyone else.
Cheers,
Devin

Seems You want feature, not implemented by intention of particular plugin (Firepath finds HTML elements matching chosen CSS selector(s) or XPath expression - but You want more - to render filtered HTML page, not just to see filtered CSS or HTML source) but You always can ask for that developers.
Althou there is workaround possibilty - share them with a friend via the FriendlyFire feature. Below is a demo video of using Firefinder and the FriendlyFire feature

Related

How to validate XPath using Firefox Web Developer Plugin?

Since Web Developer Plugin is an self-sufficient tool, ideally it should contain XPath checker/validator as FireBug did.
Actually I could not find it.
I am not sure that it exists. But if it is, please anybody help to navigate to.
Thanks!
In Firefox you can use the web developer tools console for xpath validation like this:
1.Open Web Developer tools.
2.Click on Console
3.Type $x("path")
This should let you validate that your path is valid.
References:
https://developer.mozilla.org/en-US/docs/Tools/Web_Console/The_command_line_interpreter
https://developer.mozilla.org/en-US/docs/Web/XPath
Now it is possible to use xpath directly from the browser.
Open Web Developer tools by pressing F12
In the inspector there is a search bar at the top called Search HTML
Enter your xpath there and type ENTER
Now the inspector should be pointing to the element that was the outcome of evaluating the xpath.
For example after evaluating //div[#id="notify-container"] the inspector is pointing to that div
I am using AutoPager extension on Firefox. It is quite handy for generate xpath and search xpath.
you can refer to this post for more information:
https://thachhoangautomation.wordpress.com/2017/10/11/generatesearch-cssselector-and-xpath-on-firefox-55-onward/

How to find xpath of an element in firefox inspector

In Firefox 50.1, Firebug is no longer available so I have to use the inspector but I cannot find copy ---> xpath option that was available in Firebug. How can I find the xpath of an element using the inspector?
You can use the console to check if the xpath you want return the correct element or not.
$x("//div/xpath")
https://developer.mozilla.org/en-US/docs/Tools/Settings
Follow Bellow Steps:
Step 1 : Right click on page -> Select (Inspect Element)
Step 2 : Pick an element from the page
Step 3 : Right Click on highlighted html -> Copy -> Xpath
The bug related to losing ability to 'copy XPath' from firefox inspector is fixed, verified in Firefox 56 beta, and verified in Firefox 57 alpha:
https://bugzilla.mozilla.org/show_bug.cgi?id=987877
In Firefox you can use the web developer tools console for xpath validation like this:
1.Open Web Developer tools.
2.Click on Console
3.Type $x("path")
This should let you validate that your path is valid.
You can't, firefox's inspector does not have such feature. However it does offer css selector which can be converted to xpath with various other tools.
It should be noted however that these generated selectors (xpath or css) are not accurate or reliable and you should avoid using this feature for anything but rare edge cases.
Unfortunately this doesn't work properly. When I use the copy xpath, I got this instead of the usual one: //*[#id="gwt-uid-105"]
Which is just useless :(
There aren't any extension currently which could solve this. Looks like the only way is to run an old version of FF. Can have an old 32 bit and a new 64 bit version.
Xpath Using Firefox Console: **
Answer referenced from **Xpath Using Firefox Console in selenium webdriver
Steps:
Press F12( common for all browsers), Now firefox open developer tool like below.
Naviagte to console tab
On the console editor we can verify our Xpath
For verifying xpath we have to use our xpath in following format : $x("xpath")
This is an old question but I'm glad to say that since FF 75 it supports searching by XPath, look at documentation. Here is a link to their blog entry
I know that this doesn't answer directly to the question but it helped me a lot, use Pale Moon:
Open any web page in Pale Moon browser
Right click on an element of the page
Select: "Inspect Element with Developer Tools" (a window shows up with element highlighted)
Right click highlighted element
Select: "Copy XPath"
And there you have it. You will get a "full" xpath even if the element has an id.
I would rather you study how to create xpath on your own to select the element you need. It's very simple and very very helpful specially when creating reusable methods/functions.
Go and see the xpath tutorial at w3schools or wherever.
Focus on the relationships between elements.
Edit:
Once you know how to construct a good-looking xpath, you can now test it using the browser console as mentioned by #mosaad. Still, you need to learn how to construct the xpath first. BTW, the copy xpath function wasn't available back in Jan '17. That is why I suggested he learn how to construct xpath. Even now that it is available though, I still suggest you learn because the xpath you get from those usually suck.

Where is the firefox title located in the source?

This may seem like an odd question, but does anybody know where or how to locate the title in the firefox source code? like firefox.exe and the default home page source and such?
Google yielded no results, same as on the firefox page.
Looking for it manually would take a while, considering the sheer size.
The latest source code for Mozilla Firefox is nicely indexed on DXR in a searchable form (you can even use regular expressions there!).

How to script elements embedded within an <iFrame> tag?

I am using Firefox and i have a page which has an Tag.
The contents embedded within this tag cannot be seen from normal "View Page source" option. So i installed Firebug plugin and i can get see the contents using Firebug. My issue is, i cannot script any of these elements using FireWatir. Anybody has any ideas how to do this using Firewatir? Your help would be greatly appreciated.
You can only script the iframe's page if it comes from the same domain. If so, you can access the iframe's document by doing iframe.contentDocument. You can also access the iframe's window by doing iframe.contentWindow:
https://developer.mozilla.org/en/HTML/Element/iframe
Watir and FireWatir should not have problems with frames. Take a look at Frames page at Watir wiki for more information.
You did not say what is the problem. Some relevant HTML and your Watir code would help.
I would also suggest that you post this at Watir list too.

Firefox Live DOM

Is it possible through a plugin or setting or something to allow Firefox to recognize the live DOM source code?
Basically, firebug or other similar tools can recognize elements on the page which Firefox does not.
I understand with these extensions I have the ability to see such changes made by javascript, but Firefox does not seem to fully recognize them.
I'll try to clarify.
If I load a page and view source (ctrl-U), I see what the server sent to Firefox, and what Firefox ostensibly recognizes as the source code of the page. If in that source code, there is javascript which alters the DOM, and then I hit (ctrl-U) again, the code is not updated.
I am using a testing tool (iMacros firefox plugin) to automate functionality, but it does not recognize the updated DOM because Firefox does not. Firebug and similar tools can recognize these "live" updates. Does that help?
http://www.chapter31.com/2006/12/04/viewing-ajax-generated-source-code/
You can try using the web-developer extension with a view-generated-source option.
I'm still not sure I understand your question, but I think what you're getting at is the Web Developer extension for FireFox, specifically its "View Generated Source" feature.
That will let you see the altered DOM.
Firebug gives u this ability:
for instance check the HTML tab when running a jquery ticker and see the dynamic changes live in the DOM
Usually, when I have weird issues with either the console or the DOM inspector with firebug, I find restarting the browser and validating your code is the way forward.
That said, I'm not really following your question, the document that firebug shows is the same one in the firefox window...?
It looks like the problem is not that you want firefox to show the current DOM when you hit CTRL+U, but that you want some automated testing tool to be able to test your web pages.
Perhaps you should use a testing tool that is suited to the job of testing rich web applications, Selenium, for example, can do this.

Resources