-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export HAR without the Toolbox being open #11
Comments
thanks looks promising! :) |
Please! |
HAR API are not exposed to new tabs (about:newtab) in case e10s is on. The client (target) isn't firing "navigate" (neither onTabNavigated) event when about:newtab tab is navigated to another location. There is only "close". So, there is no way how to expose HAR API to the new loaded page. @soulgalore @JosephCastro: The problem is only related to e10s, where the feature works only on the tab opened by default after Firefox launches (or tabs restored by the session manager). What is actually your scenario? Are you loading pages directly in the default browser tab or opening other tabs as well? How typical scenario looks like? Honza |
The typical use case for us: We start the browser, load the URL directly in the default browser tab (we never open other tabs), collect some metrics using javascript and then close the browser. Peter |
There is a new preference: extensions.netmonitor.har.autoConnect (set to false by default) There is an event 'har-api-ready' sent to the content window. You might want to handle it to know since when the HAR object is available. The HAR object isn't available immediately after a browser tab is opened, but it's there till you close the tab. So, if you navigate/refresh the tab the HAR object is there all the time. There is limitation if e10s is on. New tabs opened through about:newtab (i.e. clicking on the + button in the tab bar and consequently load the content) don't have the HAR object. However if you open a new tab through a link (Open In New Tab) it should work. The issue will be gone when https://bugzilla.mozilla.org/show_bug.cgi?id=1068400 is fixed. I need feedback now. Honza |
Wow sounds great. If you could generate an xpi I can test it asap. |
Thanks! Tested but I couldn't get it to work, maybe I do something wrong? First: I've got a test I use where I push the F12 using Selenium, it worked in the old version but when I only switched to the new xpi (didn't changed anything else), it failed (meaning no HAR object), is that expected? If I switch back to the old xpi it works. |
Do you see any errors in the Browser Console? (Ctrl+Shift+J)? |
Have everything automated so it's hard to see, will look into it tomorrow. Did a quick test manually and then your test page worked for me, so it could be something on my side, but I need some time to go through it. |
Sure, thanks for testing! |
Ah, it was a compatibility issue with Fx 42 (I didn't test it). Here is another fixed version: Does this version work for you? Honza |
YES it works now, super! Works both testing manually and automated. Thanks, this is super cool. |
Excellent, thanks for verification. Honza |
It should be possible to export HAR without the Toolbox being open. This would nicely simplify HAR export automation.
Honza
The text was updated successfully, but these errors were encountered: