watirjssh

Do I need to open the firefox browser manually from the command prompt with -jssh extension and run the tests in firefox


I have installed firewatir 1.8.0, jssh 0.9 addon.

Do I need to open the firefox browser manually from the command prompt with -jssh extension every time I want to run the tests in firefox?

When I try to run the tests without manually opening the browser I am getting the following error:

C:/Ruby192/lib/ruby/gems/1.9.1/gems/firewatir-1.8.0/lib/firewatir/firefox.rb:156:in `rescue in set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option(Watir::Exception::UnableToStartJSShException)

Also I tried running the tests by changing the path from "C:\Program Files\Mozilla Firefox\firefox.exe" to "C:\Program Files\Mozilla Firefox\firefox.exe" -jssh in the Target text box of the Mozilla Firefox Properties window.


Solution

  • Yes see here fore more info

    You will need to open Firefox using acommand line argument to get FireWatir to recognize jssh. To do this, open your command prompt, or a terminal, and run:

    firefox.exe -jssh
    

    or

    ./firefox-bin -jssh
    

    from the appropriate folder, depending on your platform.

    i'd also encourage you to look at watir-webdriver as an alternative. Ongoing development of JSSH/firewatir is doubtful for Firefox 4 and beyond. Watir-webdriver is looking like the way to go, especially if you're just starting out.