Not able to send command to remote computer. --------------------------------------------
Key: WTR-482 URL: http://jira.openqa.org/browse/WTR-482 Project: Watir Issue Type: Bug Components: Unit Tests Affects Versions: Soon Environment: Windows XP running IE7 Reporter: bhavesh Priority: Critical Fix For: Soon Hi Earlier i have Ruby 1.8.* and my code to send command to linux box is working fine. But now i upgraded to Ruby 1.9.2. So i upgraded needle, setsftp and netssh too. Now same piece of code is not working, it throws error for on_success. This is the code in my script : ################ def issueCommandInKazBox(okMachine="", command="", matchLog="", user="admin", passwd="kazeon") puts " issueCommandInKazMachine=#{okMachine}" puts " issueCommandInKazcommand=#{command}" puts " issueCommandInKazstatus=#{matchLog}" puts " issueCommandInKazuser=#{user}" puts " issueCommandInKazpasswd=#{passwd}" tempString = "" Net::SSH.start(okMachine, user, :password => passwd, :paranoid => false ) do |session| session.open_channel do |channel| channel.on_success do puts "shell was started successfully!" puts "Adding command - #{command}..." channel.send_data "#{command}\n" channel.send_data "exit\n" # tell the shell to exit end channel.on_failure do puts "shell could not be started!" end channel.on_data do |ch,data| puts "recieved the following from shell" puts "#{data}" tempString = tempString + "\n" + data end channel.on_close do puts "shell terminated" end channel.send_request "shell", nil, true end session.loop end ############# Are libraries are changed? did we change the syntax for the command? Im stuck because of this change, my first step is to do send files to remote computer and execute few commands and then only i can start the regression suite. Can you please update me Bhavesh -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.openqa.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ Wtr-development mailing list Wtr-development@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development