我刚刚开始使用 cucumber 和 watir 进行一些站点测试,一切正常,但测试后 firefox 并没有关闭。我收到此错误:
!!! error running onStopped callback: TypeError: callback is not a function
*** LOG addons.xpi: shutdown
!!! error running onStopped callback: TypeError: callback is not a function
*** LOG addons.xpi: shutdown
!!! error running onStopped callback: TypeError: callback is not a function
*** LOG addons.xpi: shutdown
任何想法,任何人?
抱歉 - 忘记了示例代码!
require 'watir-webdriver'
Before do
$browser = Watir::Browser.new
end
After do
$browser.close
end
Given ... (etc. - all the step defs here)