lib/selenium/remote_control/remote_control.rb in selenium-client-1.2.14 vs lib/selenium/remote_control/remote_control.rb in selenium-client-1.2.15
- old
+ new
@@ -1,11 +1,11 @@
module Selenium
module RemoteControl
class RemoteControl
attr_reader :host, :port, :timeout_in_seconds
- attr_accessor :additional_args, :jar_file
+ attr_accessor :additional_args, :jar_file, :log_to
def initialize(host, port, timeout_in_seconds = 2 * 60)
@host, @port, @timeout_in_seconds = host, port, timeout_in_seconds
@additional_args = []
@shell = Nautilus::Shell.new
@@ -14,9 +14,10 @@
def start(options = {})
command = "java -jar \"#{jar_file}\""
command << " -port #{@port}"
command << " -timeout #{@timeout_in_seconds}"
command << " #{additional_args.join(' ')}" unless additional_args.empty?
+ command << " > #{log_to}" if log_to
@shell.run command, {:background => options[:background]}
end
def stop