Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Wish: support custom user agents so we can set the timeout on the UA. #39

c9s opened this Issue · 10 comments

4 participants

Yo-An Lin Aditya Ivaturi Mark Stosberg brianmed
Yo-An Lin

as title.

I started a selenium rc server in a virtualbox machine on remote server, when taking screenshot, it just stops. If I remove the screenshot method, it works fine.

but if I started the virtualbox on my local machine, it works all fine.

Yo-An Lin

Just found the transfer is too slow from virtualbox from another machine.. orz

Yo-An Lin

May we have an useragent option to specify customized useragent ?

Aditya Ivaturi

I need some clarification - are you using 1.x or 2.x server? Selenium RC is 1.x which this module doesn't support.

Coming to your user agent question, this module is designed to support the JSON wire protocol, so your request might not be possible. You can try using the extra capabilities to set some of those stuff, but I believe it works primarily for browsers like Firefox & is not universally supported. I could be wrong though, but this is something I have to look in to.

Yo-An Lin

I am using Selenium RC 2.25.0. I set the timeout to larger than 180 seconds by modify driver module code, and it works.

And yes it's a JSON wired protocol, there are many implementations that implements LWP::UserAgent interface, like LWP::UserAgent::POE, LWP::UserAgent::ProxyHopper .. etc.

so if the useragent option is provided, people can build a user agent object with their own custom options for Selenium::Remote::Driver to make json requests.

Aditya Ivaturi

Sorry, I completely forgot about this.

Back to your suggestion of adding user-agent option - I'm not sure how this will help in your case. AFAIK, WebDriver server doesn't really care about user-agents. So how is that supposed to help you download the screenshots faster?

Yo-An Lin
Aditya Ivaturi

I have to check and see if the server will honor those settings. I'll confirm it & get back to you.

Yo-An Lin
brianmed brianmed was assigned
Mark Stosberg

I think there may be some confusion here. There are two User agents involved:

  1. The user agent that Selenium::Remote::Browser users to connect to the driver browser.
  2. The driven browser is itself referred to as User Agent.

Are you asking to be able to modify the user agent that Selenium::Remote::Browser uses to drive the target browser with? I think that could be an interesting option.

Yo-An Lin

Thanks for the reply, This seems been solved in the new version (selenium rc).

Yo-An Lin c9s closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.