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

https directs #203

dmfranko opened this Issue Mar 27, 2013 · 5 comments


None yet
2 participants

For a while now I've noticed a problem with what I believe are https redirects. For example if browse to "https://www.gmail.com" I should be redirected to https://mail.google.com/mail/ which then redirects to https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2. The redirect appears to work as expected when using something like chrome. I'm not just having this problem with gmail, and I'm not trying to automate gmail either :), but it's a good public example.

b = Watir::Browser.new :phantomjs
=> #<Watir::Browser:0x1074dde80 url="about:blank" title="">
=> "about:blank"
=> "about:blank"

b = Watir::Browser.new :chrome
=> #<Watir::Browser:0x101eebce8 url="chrome://newtab/" title="New Tab">
=> "https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2"

[user:admin][~]--> phantomjs -v

*** LOCAL GEMS ***

selenium-webdriver (2.31.0, 2.30.0, 2.29.0, 2.27.2, 2.27.1, 2.26.0, 2.25.0, 2.22.1, 2.21.2, 2.20.0)
watir-webdriver (0.6.2, 0.6.1, 0.5.5, 0.5.4)


detro commented Mar 28, 2013

Will look into it.

dmfranko commented May 8, 2013

Is there anything I can do to help diagnose this? Like, where could I start looking?


detro commented Jan 1, 2014

Have you tried to fake the User Agent to a Chrome User Agent?

Google might be protecting itself from Robots.
PhantomJS is classified as a ROBOT now days by every major website.

dmfranko commented Jan 3, 2014

I've actually had better luck with phantomjs 1.9.2, and I think setting the browser agent is going to be a necessity for some of the apps I'm testing as well, so I'll give that a try as well and report back.


detro commented May 27, 2014

I consider this solved or no longer an issue.

@detro detro closed this May 27, 2014

@detro detro added invalid and removed phantomjs-related todo labels May 27, 2014

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