Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

https directs #203

Closed
dmfranko opened this Issue · 5 comments

2 participants

@dmfranko

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
=> #
b.goto("https://gmail.com")
=> "about:blank"
b.goto("https://www.gmail.com")
=> "about:blank"

b = Watir::Browser.new :chrome
=> #
b.goto("https://gmail.com")
=> "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
1.9.0

*** 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
Owner

Will look into it.

@dmfranko

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

@detro
Owner

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

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
Owner

I consider this solved or no longer an issue.

@detro detro closed this
@detro detro added invalid and removed phantomjs-related todo labels
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.