webdriver.firefox.profile - using a custom profile for firefox in Jmeter

971 views
Skip to first unread message

Shailaja Srinivasan

unread,
Oct 1, 2014, 9:54:09 PM10/1/14
to jmeter-...@googlegroups.com
I have a need to use a custom FF profile for my jmeter-webdriver tests. I have been trying to use the webdriver.firefox.profile system property but its not working. Is this not implemented? if it is - please guide me on the usage.

Thanks
Shy

gli...@gmail.com

unread,
Oct 2, 2014, 7:03:52 AM10/2/14
to jmeter-...@googlegroups.com
How do you set the property? Correct ways are:

  1. Add the next line to system.properties file (lives under /bin folder of your JMeter installation
    webdriver.firefox.profile=profilename

  2. Set it as a command line argument via -D key as
    jmeter -Dwebdriver.firefox.profile=profilename

If the property is not set, a brand new profile will be created. 

Make sure that you use correct profile name, not path to profile directory. 

Existing profiles information is stored in profiles.ini file which lives under %APPDATA%\Roaming\Mozilla\Firefox on Windows or under ~/.mozilla/firefox on Linux/Unix systems so if you forgot your profile name or have a lot of profiles you can check this file contents

[General]
StartWithLastProfile=1

[Profile0]
Name=default
IsRelative=1
Path=pfrf2aom.default

[Profile1]
Name=webex
IsRelative=0
Path=/opt/webex/firefox

[Profile2]
Name=webdriversampler
IsRelative=0
Path=///tmp/testprofile
Default=1


Given "webdriversampler" is the profile name you want to use set property as 
webdriver.firefox.profile=webdriversampler
 

References:



Shailaja Srinivasan

unread,
Oct 6, 2014, 1:20:52 PM10/6/14
to jmeter-...@googlegroups.com
Thanks for your reply. I tried the option that you have mentioned.

1. specifying a valid firefox profile in system.properties for WEBDRIVER.FIREFOX.PROFILE. this property seems to be ignored and the firefox driver that is part of jmeter always starts a new anonymous profile. I tried WEBDRIVER.FIREFOX.BIN to set the firefox path and that is properly recognized and used

I wonder if the Jmeter-Webdriver-firefoxdriver(as bundled with jmeter-plugins) does not support a firefox custom profile

Cheen-Pin Lim

unread,
Oct 6, 2014, 4:54:09 PM10/6/14
to jmeter-...@googlegroups.com

I might have to look into this use case as I've added the ability to switch user agents in the latest release. This is done by creating a Firefox profile behind the scenes. I'll test this scenario to see if it is still compatible with the latest version.

Regards
CP

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dewakkere...@gmail.com

unread,
Jan 30, 2015, 3:49:00 PM1/30/15
to jmeter-...@googlegroups.com
Here same issue, i tried Set it as a command line argument via -D key as you specified, but it's not loading the profile I want (the default profile I've setup properly)

I need this caus it's the only option for me to start a test, ie by disabling a java security check and setting the plugin.state.java from 1 to 2 in advanced firefox profile.  

Andrey Pohilko

unread,
Jan 31, 2015, 4:53:03 AM1/31/15
to jmeter-...@googlegroups.com, dewakkere...@gmail.com
The latest changes for firefox config allows to load extensions and set preferences. WIll this be enough to set up your profile?

To try it, please download latest developer snapshot.

--
Andrey

пятница, 30 января 2015 г., 23:49:00 UTC+3 пользователь dewakkere...@gmail.com написал:

dewakkere...@gmail.com

unread,
Jan 31, 2015, 5:23:32 PM1/31/15
to jmeter-...@googlegroups.com
Hmm I can try that but it's hard to try I'm still using ff 28 becuase it's the only one working in my current JMETER setup! I can configure FF as I want, just I cannot load it in JMETER using jmeter -Dwebdriver.firefox.profile=profilename

eprocurem...@gmail.com

unread,
Feb 2, 2015, 12:48:11 PM2/2/15
to jmeter-...@googlegroups.com, dewakkere...@gmail.com
Now I understand what you mean with 'developer snapshot'! Thanks. It's not working because where I am now, security blocks me from changing the parameters extensions.blocklist.enabled and plugin.state.java. Can I change the default jmeter profile?

ashish...@gmail.com

unread,
Oct 16, 2017, 9:31:50 AM10/16/17
to jmeter-plugins
Hi Shailaja,

Were you able to resolve this? 

Thanks,
Ashish
Reply all
Reply to author
Forward
0 new messages