lib/true_automation/client.rb in true_automation-0.3.16 vs lib/true_automation/client.rb in true_automation-0.3.18
- old
+ new
@@ -9,10 +9,16 @@
def start(options)
@port = options[:port] || 9515
remote = options[:remote]
+
+ if options[:driver]
+ driver_path = " --driver #{options[:driver]}"
+ driver_path += " --driver-version #{options[:driver_version]}" if options[:driver_version]
+ end
+
@executable = ENV['TRUEAUTOMATION_EXEC'] || 'trueautomation'
if find_executable(@executable).nil?
raise "`#{@executable}` not found. Can not find TrueAutomation.IO client"
end
@@ -21,10 +27,10 @@
puts "TrueAutomation.IO client #{trueautomation_version.strip}"
Dir.mkdir('log') unless File.exist?('log')
logfile = "log/trueautomation-#{Time.now.strftime('%Y%m%dT%H%M%S')}.log"
- @pid = spawn("#{@executable} --log-file #{logfile} --port #{@port} #{remote}")
+ @pid = spawn("#{@executable} --log-file #{logfile} --port #{@port}#{driver_path}#{remote}")
puts "Started TrueAutomation.IO client with pid #{@pid} listening to port #{@port}"
@pid
end