http://stackoverflow.com/questions/7328494/selenium2-firefox-use-the-default-profile
Is it correct that the java code example shown (for specifying the
firefox profile to use) is being turned into JsonWireProtocol commands?
If so, that is great. But can someone tell me the actual web service
commands being used? I can then implement this in the PHP library.
(Responses as to why my various attempts to specify the firefox profile
failed are also warmly welcome. Here or on StackOverflow, either is fine
by me :-)
Thanks,
Darren
--
Darren Cook, Software Researcher/Developer
http://dcook.org/work/ (About me and my work)
http://dcook.org/blogs.html (My blogs and articles)
http://code.google.com/p/selenium/wiki/JsonWireProtocol
When transmitting the profile, we first zip up the profile then base64
encode that.
Simon
> --
> You received this message because you are subscribed to the Google Groups "webdriver" group.
> To post to this group, send email to webd...@googlegroups.com.
> To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
>
>
Hello Simon,
Thanks for the reply. So I actually send the whole "default" profile
directory over http and then Selenium will recreate that under another
directory name next to my existing "default"? Interesting. Nice way to
avoid corrupting my real profiles, which I can see would be ideal for
unit testing. [1]
As I can't see it documented in the above URL, could you tell me exactly
how the profile is sent? I assume it is a parameter of the /session
command [2]. Is it a top-level parameter (e.g. called "profile"
perhaps?) Or is it a key in the desiredCapabilities parameter [3]? Or
something else?
Also, by "zip up"... this means what the windows or unix "zip" command
does? Or does it mean using tar and gzip?
Thanks,
Darren
[1] I'd still like a way to specify to use an existing profile, as when
using Selenium for browser automation rather than unit testing this can
be more useful (e.g. if I want to create bookmarks, or fill the browser
cache, or even simply leave the cookies intact so I can manually browse
a website at the end of the automated part); but by the sounds of all
the answers I've got, this is not a feature at the moment.
[2]: http://code.google.com/p/selenium/wiki/JsonWireProtocol#/session
[3]:
http://code.google.com/p/selenium/wiki/JsonWireProtocol#Desired_Capabilities
>> I asked a selenium question here:
>>
>> http://stackoverflow.com/questions/7328494/selenium2-firefox-use-the-default-profile
>>
>> Is it correct that the java code example shown (for specifying the
>> firefox profile to use) is being turned into JsonWireProtocol commands?
>> If so, that is great. But can someone tell me the actual web service
>> commands being used? I can then implement this in the PHP library.
>>
>> (Responses as to why my various attempts to specify the firefox profile
>> failed are also warmly welcome. Here or on StackOverflow, either is fine
>> by me :-)
Basically we decode the base64 and then unzip (yes, it's a zip --- we
always use that when transferring binary data) that binary blob. It's
given the key "firefox_profile" in the Capabilities.
Simon