Regarding the event:
What happens with requests that start after that period? Will they be ignored?
Could a timeout period of 0 or -1 mean to export all requests of the page? Also, should a second event be triggered after the requests are finished to let the automated system knows when it can start processing the exported HAR?
2) Expose helper event:
"HARPageLoaded": sent when the page finishes loading. This is different from the existing 'DOMContentLoaded' and 'load' events. This new event is sent when there are no pending HTTP requests and no new HTTP requests has started for given period of time (e.g. 1000 ms).
I believe that the trigger method and the event should be enough for integration with any automated system (e.g. based on Selenium). The rest is upto the automated system - the driver.
What do you think?
Can we simplify the feature yet?
Do you need more to implement automated HAR export from the browser?
document.addEventListener("DOMContentLoaded", function gimmeHAR (e) { // initiate somehow var har = window.HAR.export() // or var har = new HAR.triggerExport() // etc ...
har.addEventListener("ready", function nomnom (Obj) { // Obj = HAR goodness })})
I would suggest adding an option for saving/copying a single entry in the network panel.this is particularly useful when debugging web applications and the one API/resource call is troublesome and needs to be debugged independently.essentially this would export a single entry and wrap it with appropriate HAR object. "pages" and "pageTimings" would be omitted / empty since their values wouldn't reflect the individual entry of course.I would also extend that to the automated export you're describing, allowing event listeners for individual entries as soon as the entry object is ready.
2) Expose helper event:
"HARPageLoaded": sent when the page finishes loading. This is different from the existing 'DOMContentLoaded' and 'load' events. This new event is sent when there are no pending HTTP requests and no new HTTP requests has started for given period of time (e.g. 1000 ms).
I believe that the trigger method and the event should be enough for integration with any automated system (e.g. based on Selenium). The rest is upto the automated system - the driver.
What do you think?
Can we simplify the feature yet?
Do you need more to implement automated HAR export from the browser?I don't see the value gained here by adding another DOM level event? "DOMContentLoaded" is the correct event to listen to, then ask for the HAR export.in other words: I'm listening on events related to the DOM, and any changes related to it "HARPageLoaded" does not translate to a "DOM" event as far as I can tell, it's a background process that's creating the HAR object, not affecting the DOM object itself.another example is adding an image element and listening to "load" event then triggering HAR export.similarly, any DOM-level event can be used to trigger export, current or future ones ("load", "domready", etc ... depending on implementation / browser)
if creating the HAR object does in deed require an event-like behaviour (its happening in a different thread / background process / etc ...) then there can still be an event such as "HARReady", but on the HAR object, not the DOM. example:
document.addEventListener("DOMContentLoaded", function gimmeHAR (e) {// initiate somehowvar har = window.HAR.export()// orvar har = new HAR.triggerExport()// etc ...har.addEventListener("ready", function nomnom (Obj) {// Obj = HAR goodness})})
Now I read the Firefox bug, I understand that Har export is becoming part of Firefox.Since it is going to be lightweight, do we have options for sending beacons - if not, can you spin out the code that you've written in FBug 3.0 to a new extension which can publish the har to a URL on "HARPageLoaded" or Manual trigger.My earlier request to add headers will fall here - it should not be part of the firefox browser.ThanksSenthil.
On Wednesday, May 27, 2015 at 12:31:37 PM UTC+5:30, Senthil wrote:1. What do you mean by saying "extensions not needed anymore" -> "Har Export" is part of Firebug 3.0 or Firefox network panel??2. I have been using Netexport with Selenium and I find "triggerExport" and "clear" events good enough to automate the page.
2.5 I would REQUEST ability to add headers to the beacon URL when export is triggered (***important***) - I would want to send info about buildid, runid as part of the header while keeping the beacon url intact
3. "HARPageLoaded" would be a nice addition - WILL user be allowed to configure the time period (1000 ms or 5000) after which the event will be fired??
And thanks for HAR and HAR Export - It is helping me a lot with my work.
I was more concerned with "pageTimings" object within the "page" object itself as not to create any confusion on performance timings for the individual entry ... your point about "startedDateTime" is right on the spot, which only leaves "title" and "comment" to be of any use.
further, in this scenario, the "pages" array will ALWAYS have one item only: the page related to the "entry" exported.
yep, that works perfectly fine (I prefer promises when possible) my example was simply following the "eventListener" discussion from earlier ...
Getting HAR data as a string works for me - I think having it minimal is the best case scenario for everyone - it just does what it is supposed to do (clear and trigger).It also gives me the flexibility to store har with all the additional info that I may want to add.
--
You received this message because you are subscribed to the Google Groups "Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebug+u...@googlegroups.com.
To post to this group, send email to fir...@googlegroups.com.
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebug/dd88bc69-80eb-4de0-ae41-f8b64a6f640d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.