|
正在学习用Selenium和Rspec,用Selenium录制好操作步骤后,保存成Rspec代码,用CommandLine运行时出现以下错误提示,紧急求助!
No connection could be made because the target machine actively refused it. - connect(2)
Rspec代码:
require 'User.rb'
gem 'selenium-client'
require 'selenium/client'
describe User do
attr_reader :selenium_driver
alias :page :selenium_driver
before(:all) do
@verification_errors = []
@selenium_driver = Selenium::Client:river.new \
:host => "localhost",
:port => 4444,
:browser => "*firefox",
:url => "http://g.cn",
:timeout_in_second => 60
end
before(:each) do
@selenium_driver.start_new_browser_session
end
it "Should be login by user" do
end
end |
|