开发者

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

开发者 https://www.devze.com 2023-02-22 20:40 出处:网络
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?

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\Moz开发者_如何学运维illa Firefox\firefox.exe" -jssh in the Target text box of the Mozilla Firefox Properties window.


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.


When running on my Mac the WATIR test starts Firefox with the JSSH automatically, but usually this takes longer to start than the connection timeout in the script.

So it is easier to start it manually before running the scripts.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号