Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Closed
c9s opened this Issue Aug 10, 2012 · 10 comments

Comments

Projects
None yet
4 participants

c9s commented Aug 10, 2012

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.

c9s commented Aug 10, 2012

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

c9s commented Aug 10, 2012

May we have an useragent option to specify customized useragent ?

Collaborator

aivaturi commented Aug 10, 2012

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.

c9s commented Aug 11, 2012

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.

Collaborator

aivaturi commented Aug 30, 2012

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?

c9s commented Aug 30, 2012

If I can adjust timeout option of user agent, maybe it won't be broken by
exceeding the timeout.

On Fri, Aug 31, 2012 at 12:36 AM, Aditya Ivaturi
notifications@github.comwrote:

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?


Reply to this email directly or view it on GitHubhttps://github.com/aivaturi/Selenium-Remote-Driver/issues/39#issuecomment-8165527.

Best Regards,

Yo-An Lin

Collaborator

aivaturi commented Aug 30, 2012

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

c9s commented Aug 30, 2012

thank you, really appreciate.

On Fri, Aug 31, 2012 at 3:02 AM, Aditya Ivaturi notifications@github.comwrote:

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


Reply to this email directly or view it on GitHubhttps://github.com/aivaturi/Selenium-Remote-Driver/issues/39#issuecomment-8170521.

Best Regards,

Yo-An Lin

@ghost ghost assigned brianmed Mar 28, 2013

Collaborator

markstos commented Jul 25, 2013

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.

c9s commented Jul 30, 2013

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

@c9s c9s closed this Jul 30, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment