Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saucelabs and Non-Firefox Browsers Not Working #106

Closed
erickbrower opened this issue Mar 26, 2014 · 2 comments
Closed

Saucelabs and Non-Firefox Browsers Not Working #106

erickbrower opened this issue Mar 26, 2014 · 2 comments

Comments

@erickbrower
Copy link

When running tests against Saucelabs with a configuration like the one in bin/nightwatch.json, and specifying any browser other than firefox, when Nightwatch requests a new session, Saucelabs responds with a 302 with a "Location" in the headers instead of putting the location in the response body. Nightwatch doesn't follow this redirect and the tests never start on Sauce. I've confirmed that Safari, iOS simulator, all versions of Internet Explorer, and Chrome are all affected by this issue. Firefox works perfectly fine though.

I'm running a SauceConnect tunnel at localhost:4445, here's my nightwatch.json: https://gist.github.com/erickbrower/cab948b05122066414f8

Here's what the shell output looks like, including a dump of response.headers: https://gist.github.com/erickbrower/ddf075faf1bcdb419e59

And here's what it looks like when I GET that URL: https://gist.github.com/erickbrower/257cf2a4a11358f8e970

I'm more than happy to test, just let me know

@erickbrower erickbrower changed the title Nightwatch Not Following 302 on New Session for Non-firefox browsers Saucelabs and Non-Firefox Browsers Not Working Mar 26, 2014
@erickbrower
Copy link
Author

Just got a response from Saucelabs support. The support tech quotes one of their developers. Here's what he says:

"The webdriver spec was originally set up to respond to a new session request with a 303 redirect instead of a 200 with the session id in the body, and this is how we still do it.

Long story short, Nightwatch JS needs to support both."

I'm assuming he means 302, not 303

@beatfactor
Copy link
Member

Yes, we need to support the 3xx redirects also.

beatfactor added a commit that referenced this issue Mar 29, 2014
* features/v0.4:
  updated tests
  properly handling session create redirect status
  refactored the attachment screenshots a bit
  fixed a problem with generating the test report
  updated execute so it makes the args paramter optional and added follow redirects in an attempt to fix #106
  added support for async setUp/tearDown, fixed the timeouts protocol actions and added new frameParent action
  Include screenshots as attachments in junit
  Save screenshot as part of the test result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants