Can a HAR be generated when running an automated test using dalekjs.

57 views
Skip to first unread message

Balaji Govindarajulu

unread,
Dec 8, 2014, 5:04:38 AM12/8/14
to dal...@googlegroups.com
Hi

I am a newbie to dalekjs. Can a HAR file be generated for network requests and responses when running a test.

Thanks,

Balaji

asciidisco

unread,
Dec 8, 2014, 5:58:23 AM12/8/14
to dal...@googlegroups.com
Hey.

The nature of Webdriver (the protocol Dalek is using to interact with its Browsers) forbids to access network stats & header access by design.
This is the fact, because the protocol designers want it clear that you should only simulate user interactions a "regular" page visitor could perform.

If you want to access the network stack, you have to use a proxy.

If you want to do this with PhantomJS, you have to patch the PhantomJS driver here: https://github.com/dalekjs/dalek-browser-phantomjs/blob/master/index.js#L301

Your best bet to generate HAR files then would be using BrowserMob Proxy: http://bmp.lightbody.net/


We have plans to include this functionality in future versions of Dalek directly, but this isn't an easy thing to do, if you keep in mind that
you have to support https & spdy. So it will take some time before we are able to ship it.

Cheers
Sebastian

Balaji Govindarajulu

unread,
Dec 9, 2014, 6:53:17 AM12/9/14
to dal...@googlegroups.com
Hi Sebastian,

Thank you very much for the reply and your time.

Thanks,

Balaji Govindarajulu.
Reply all
Reply to author
Forward
0 new messages