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 Safari, IE Unable to Find Body Element #113

Closed
erickbrower opened this issue Mar 30, 2014 · 17 comments
Closed

SauceLabs Safari, IE Unable to Find Body Element #113

erickbrower opened this issue Mar 30, 2014 · 17 comments

Comments

@erickbrower
Copy link

Thanks @beatfactor for the quick turnaround for #106! I just pulled master to give it a spin and now both Firefox and Chrome work perfectly against SauceLabs! It looks like there's a new problem with Safari and IE though :(. In each case, the browser sits with a "Page Cannot Be Displayed" error on SauceLabs, while Nightwatch gives tons of Selenium errors about being unable to find the body element.

IE 10: https://gist.github.com/erickbrower/765d4f06ef5548e0e9a9
IE 9: https://gist.github.com/erickbrower/a448790accdfae46be78
Safari: https://gist.github.com/erickbrower/1de32dd16fcac7d91255
nightwatch.json : https://gist.github.com/erickbrower/cab948b05122066414f8
Example Screenshot: https://dl.dropboxusercontent.com/s/y0cbtofc5eewo47/sauce_screenshot_ie9.png

I confirmed several times that I could switch back to Chrome or Firefox in nightwatch.json and the tests would work fine.

@beatfactor
Copy link
Member

did you have those problems before the last version?

@erickbrower
Copy link
Author

@beatfactor No, but only because the test run never got that far before your patch for #106 . Before your patch, tests for IE wouldn't start because it couldn't get a sessionID (due to the redirect, etc). After your patch, the logs now show that IE tests are getting a sessionID but failing in some strange new way.

@beatfactor
Copy link
Member

Looking at your logs it doesnt seem that the problems are related to nightwatch. In the IE tests the element simply isn't there, which sounds like a test failure. From the Safari logs it looks like there may be a selenium error.

@erickbrower
Copy link
Author

Right, the "body"element is never shown because there is no webpage to parse, the browser at SauceLabs never renders the page. As I said before, I can simply switch browsers in nightwatch.json to chrome or Firefox and all of the tests run perfectly. It wouldn't make sense that switching browsers makes the page suddenly stop loading entirely.

Sent from my iPad

On Mar 31, 2014, at 3:21 AM, Andrei Rusu [email protected] wrote:

Looking at your logs it doesnt seem that the problems are related to nightwatch. In the IE tests the element simply isn't there, which sounds like a test failure. From the Safari logs it looks like there may be a selenium error.


Reply to this email directly or view it on GitHub.

@beatfactor
Copy link
Member

Yeah but the url command is reporting success. Could it be an issue with the tunnel?

@erickbrower
Copy link
Author

That's certainly how it's behaving -- like there's something wrong with the tunnel -- but I've run it many many times now, and it's definitely only breaking when I specify an IE or Safari browser, with 100% consistency. I'm starting a fresh SauceConnect tunnel and target app for each test run (it's a rails app). Trust me, I tested a lot before I created a ticket, because didn't want to bother you with false bugs. :(

@beatfactor
Copy link
Member

no problem, but maybe it's a configuration issue with saucelabs because I can't find anything else.

@davidlinse
Copy link
Contributor

Is it reproducible for anyone? I don't have a sauce labs account so i
can't test the configuration..

@erickbrower
Copy link
Author

I'll fire off another email to SauceLabs with my gists/screenshots and see what they have to say. I'm automating all of my company's integration tests with Nightwatch, and unfortunately Internet Explorer is one of our target browsers. I hate IE so, so very much.

Maybe Sauce is expecting some magic values in "desiredCapabilities" (who knows). I'll report back with their response.

@erickbrower
Copy link
Author

@davidlinse FYI, you can create a free account with SauceLabs https://saucelabs.com/signup if you want. They'll give you 120 testing minutes free. It would be really sweet if Nightwatch and Saucelabs worked well together, Sauce is actually a pretty great service

@beatfactor
Copy link
Member

yes, I agree. and hopefully we're getting there :).

@beatfactor
Copy link
Member

any feedback from saucelabs?

@erickbrower
Copy link
Author

Other than the auto-reply, not yet. Might take them another day or two

@sabind
Copy link

sabind commented Apr 4, 2014

I'm running nightwatch and sauce successfully from Jenkins with all 4 browsers. I originally had problems like you mentioned with IE and Safari. I have them no longer. However my environment I'm testing against is available publicly so I don't use a tunnel. Working since 0.4.7 or so.

@erickbrower
Copy link
Author

Hey guys, I've figured this out. I feel so dumb. At the very bottom of the Sauce Connect docs, there's a list of ports that Sauce Connect automatically proxies when you're running target applications on localhost. The port I was using, 3999, is not in the list. I changed it to 4000, and everything is working perfectly.

@sabind Thanks for chiming in, your comment helped me confirm it was a tunnel problem.

At least this might help keep other Nightwatch folks from making the same mistake.

@beatfactor
Copy link
Member

That's great. We should probably have a saucelabs how-to section in the guide or at least a wiki article.

@moizjv
Copy link

moizjv commented Aug 12, 2014

@beatfactor i will contribute to how-to-section for sauce

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

5 participants