Re: WebDriver + Firebug + NetExport not auto-exporting HAR

1,789 views
Skip to first unread message

Jan Honza Odvarko

unread,
Sep 13, 2012, 4:05:51 AM9/13/12
to Firebug
The previous post is here:
http://groups.google.com/group/firebug/browse_thread/thread/329a01c67443408b


I have been also testing similar scenario and publishing my results
here:
http://www.softwareishard.com/blog/firebug/automate-page-load-performance-testing-with-firebug-and-selenium/

Does it work for you if you follow the blog post?

Also, note that I am not sure if FireStarter was properly tested with
Firebug 1.10.3
You should also try without this extension

Honza




On Sep 11, 10:34 pm, "Telly K." <te...@incalas.com> wrote:
> Hello,
>
> I already wrote a post about this issue but can't seem to find it. Excuse
> the dup.
>
> I'm having problems getting netExport to auto export HAR files with
> WebDriver.
>
> I'm running a headless instannce of Firefox 14.0.1 with Firebug 1.10.3,
> netExport 0.8b22 and FireStarter 0.1a6.  All this is runnning on a Vagrant
> VM (Ubuntu Lucid32) and controlled by Selenium 2.25.0 Firefox Webdriver.
>
> Here's sample of code for reference:http://pastebin.com/C17i6kZD
>
> As you can see, I'm allowing for Firefox loading and HAR export with
> timeouts (tried ranges from 10s to 30s without luck).
>
> Also, I assume the extensions are loading correctly. Apart from getting
> Firebug token, I haven't been able to defintively confirm that (probably
> for obvious security reasons).
>
> Lastly, Firefox is exporting logs which leads me to believe the cause is
> netExport-specific but those logs are unhelpful
>
> Grateful for any ideas!
>
> Thanks in advance,
> Telly

Jan Honza Odvarko

unread,
Sep 13, 2012, 4:06:11 AM9/13/12
to Firebug

Telly K.

unread,
Sep 17, 2012, 10:14:23 AM9/17/12
to fir...@googlegroups.com
Hi, 

You're blog post was how I got it initially working by translating it to python Selenium 2.25: http://pypi.python.org/pypi/selenium/

Then, Firefox updated to v15 and hasn't worked since. 

Do you know if your solution in the blog post works with Firefox 15? 

I'm trying with v14 right now but will try v13 today. 

I've also tried without Firestarter but no luck. 

Lastly, the XPIs don't have to be in a specific location right? 

Thanks!
-Ttk

Jan Honza Odvarko

unread,
Sep 18, 2012, 9:57:38 AM9/18/12
to Firebug
On Sep 17, 4:14 pm, "Telly K." <te...@incalas.com> wrote:
> Hi,
>
> You're blog post was how I got it initially working by translating it to python Selenium 2.25: http://pypi.python.org/pypi/selenium/
>
> Then, Firefox updated to v15 and hasn't worked since.
>
> Do you know if your solution in the blog post works with Firefox 15?
No, I haven't try it with Firefox 15 yet.

> I'm trying with v14 right now but will try v13 today.
>
> I've also tried without Firestarter but no luck.
>
> Lastly, the XPIs don't have to be in a specific location right?
The scenario (described in the blog post) assumes that
firebug-1.9.2.xpi
and netExport-0.8.xpi are available in the same directory as the test
driver.

Honza

Telly K.

unread,
Sep 21, 2012, 6:08:33 PM9/21/12
to fir...@googlegroups.com
Hi Honza,

Just so I'm clear, the "test driver" in your blog post would be what and located where?

Also, with the auto-export feature: I'm assuming file/directory permission (755?) need to be set correctly on the destination path, right?

Thanks!
-Telly

Telly K.

unread,
Sep 24, 2012, 2:47:18 PM9/24/12
to fir...@googlegroups.com
I solved this (for now) by creating a Firefox profile with profile manager, then pointing webdriver to that profile later.  Here are my settings in case they're useful for others:

firebug = "/vagrant/browsers/firefox/extensions/current/firebug-1.9.2.xpi" 
netExport = "/vagrant/browsers/firefox/extensions/current/netExport-0.8.xpi"

profile = webdriver.FirefoxProfile(profile_directory="/vagrant/browsers/firefox/profile/")
try:
profile.add_extension(extension=firebug)
profile.add_extension(extension=netExport)
except Exception, e:
print e
# Firefox prefs
profile.set_preference("app.update.enabled", False)  
profile.native_events_enabled = True
profile.set_preference("webdriver.log.file", "/some/desired/path/")
# Set default Firebug preferences
profile.set_preference("extensions.firebug.currentVersion", "1.9.2") #2.0
profile.set_preference("extensions.firebug.allPagesActivation", "on")
profile.set_preference("extensions.firebug.defaultPanelName", "net")
profile.set_preference("extensions.firebug.net.enabledSites", True)
profile.set_preference("extensions.firebug.consoleexport.active", False)
# Set default NetExport preferences
profile.set_preference("extensions.firebug.netexport.alwaysEnableAutoExport", True) 
profile.set_preference("extensions.firebug.netexport.defaultLogDir", "/some/desired/path/")
profile.update_preferences()


A new issue (not a blocker, phew!) is that with every netexport auto-export har file, I'm also getting a firebug related har, for example:

Is that a setting in the profile somewhere?  I thought setting "extensions.firebug.consoleexport.active" to false would fix it but no luck.

Thanks always!
Telly

Telly K.

unread,
Sep 24, 2012, 2:52:48 PM9/24/12
to fir...@googlegroups.com
A new issue (not a blocker, phew!) is that with every netexport auto-export har file, I'm also getting a firebug related har, for example:
Is that a setting in the profile somewhere?  I thought setting "extensions.firebug.consoleexport.active" to false would fix it but no luck.

User error: When closing firefox I left getfirebug.com open in a tab so every time Firefox started up again, there it was!

Jan Honza Odvarko

unread,
Sep 25, 2012, 5:03:49 AM9/25/12
to Firebug

On Sep 21, 11:08 pm, "Telly K." <te...@incalas.com> wrote:
> Hi Honza,
>
> Just so I'm clear, the "test driver" in your blog post would be what and
> located where?
You probably figured this out already so, for others, the test driver
is the java
code and should be located in the same directory as the xpis.

> Also, with the auto-export feature: I'm assuming file/directory permission
> (755?) need to be set correctly on the destination path, right?
Probably yes, I have been testing this on Win OS

Honza
Reply all
Reply to author
Forward
0 new messages