2

Just installed the Yosemite beta today. It doesn't break any of my (other) programs so far and looks nice, so I'm all for it. But just now I tried to run one of my ruby scripts that boots up a firefox window to do some automated activities (watir), and it isn't working at all. Hangs until the script times out. I've since tried to run Watir (in ruby) on all three browsers (including Safari which I hadn't used watir with before), and got three slightly different, but similar in behavior (hangs, times/out) error messages/responses. They are as follows:

#these are the watir-related gems in my Gemfile. Some are not necessarily used for this exercise, however.
require 'selenium-wedriver'
require 'selenium'
require 'watir-webdriver'
require 'watir-scroll'

=============== FIREFOX ===========

  • definitely worked before the Yosemite installation

b = Watir::Browser.new :firefox

  • successfully launches a new firefox instance with no information in the URL bar and no content as usual
  • console proceeds to hang for 60s (can't make calls to firefox using watir commands), then throws this error

    Selenium::WebDriver::Error::WebDriverError: unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)
    

=============== CHROME ===========

  • I don't use chrome that much with watir, but it worked too before Yosemite.

    b = Watir::Browser.new :chrome

  • Successfully launches a browser with a yellow drop-down caution error below the url bar stating:

    You are using an unsupported command-line flag: --ignore-certificate-errors. Stability and security will suffer.

  • script hangs just like the other two do, and eventually throws this error:

Selenium::WebDriver::Error::UnknownError: unknown error: unable to discover open pages (Driver info: chromedriver=2.3,platform=Mac OS X 10.10.0 x86_64)

=============== SAFARI ===========

  • I never tried this one before now. Didn't even know it existed.

b = Watir::Browser.new :safari

  • successfully launches new Safari instance at this url: 127.0.0.1:59302/?url=ws%3A%2F%2F127.0.0.1%3A59302%2Fwd
  • page has the title "Safari Driver Client" & gives live status updates. the messages for me were as follows
    • [ 0.004s] [safaridriver.client] Requesting connection at ws://127.0.0.1:59302/wd...
    • [ 2.540s] [safaridriver.client] Unable to establish a connection with the SafariDriver
  • meanwhile the console hangs and eventually throws this error:

    Selenium::WebDriver::Error::TimeOutError: timed out waiting for Safari to respond

So anyway, I need these watir scripts to work on my machine and have two options: - Spend/Wait 16+ hours restoring my mac to mavericks using the Restore tool in conjunction with a WiFi-connection-only Apple Time Capsule. - Write a heavily documented & detailed question on stack overflow addressing this issue, and sticking with Yosemite.

I would definitely prefer the latter.

Thanks guys

boulder_ruby
  • 38,457
  • 9
  • 79
  • 100
  • FWIW: there's an open [chromedriver](https://code.google.com/p/chromedriver/issues/detail?id=879) for Yosemite support. – orde Sep 19 '14 at 18:06

2 Answers2

1

OK, I had exactly the same issue today.

Fixed by downgrading Firefox to v28

https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/mac/en-GB/

I am sure there are security implications in doing this, but it is at least running my tests again!

Hope this helps.

IT_puppet_master
  • 702
  • 5
  • 20
0

I had issues with ChromeDriver on Yosemite when running selenium / protractor tests until upgrading Java / JRE to version 8. Not sure if this is related but thought I'd post my fix

Ollo
  • 49
  • 3