4

I've been dabbling with Selenium to do some testing on a site and I'm trying to set up RC so I can run tests in multiple browsers. I can run a simple test I put together in both Chrome and Firefox, but when I try to test in Safari, the test window never opens. Things just sort of just sit there, no error message given.

I recorded a video of my test running in Firefox successfully, then in Safari unsuccessfully: http://cl.ly/0G392F2O3X2j0V1S1Q1g

Here's what I see output in the selenium server I have running via the terminal:

10:54:10.297 INFO - Command request: getNewBrowserSession[*safariproxy, http://gdgt.com/, ] on session null
10:54:10.297 INFO - creating new remote session
10:54:10.298 INFO - Allocated session 687ac4cc58364c7d818a054d80a717cb for http://gdgt.com/, launching...
10:54:10.298 INFO - Backing up OS X global network settings...
10:54:10.479 INFO - Modifying OS X global network settings...
10:54:10.855 INFO - Launching Safari to visit 'http://gdgt.com/selenium-server/core/RemoteRunner.html?sessionId=687ac4cc58364c7d818a054d80a717cb&multiWindow=true&baseUrl=http%3A%2F%2Fgdgt.com%2F&debugMode=false' via '/var/folders/1k/1kdbzdHKFjuE3YNGCoSGmk+++TI/-Tmp-/customProfileDir687ac4cc58364c7d818a054d80a717cb/redirect_to_go_to_selenium.htm'...
11:07:11.899 WARN - Invalid length: Content-Length=28561 written=22080 for http://storechat.apple.com/hc/6964264/

Any advice on this?

1 Answer 1

2

I assume you are using Selenium Remote Control. From memory, it seems that there was an issue with Safari but I can't find it now.

From the error message in the log it would appear that the connection has been closed before all the content was written.

Invalid length: Content-Length=28561 written=22080

This means the client closed the connection. In general, it is bad practice to send more than 20,000 characters via a URL. Most browsers do not support this. As a test, you may want to try it again with fewer URL characters (under 20000). If that does not work then:

First, check browser security settings in Safari. Second, check executable permissions for the Safari executable.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.