----------------------------------------------------------------------------------------
Telnet.Open Connection ${DUT_IPaddr}
Telnet.Read Until :
Telnet.Write ${DUT_Username}
Telnet.Read Until :
Telnet.Write ${DUT_Password}
Telnet.Read Until >
Telnet.Write enable
Telnet.Read Until :
Telnet.Write ${DUT_enPassword}
Telnet.Set Prompt \#
Telnet.Write conf t
Telnet.Read Until \#
Telnet.Write hostname Cisco2-LabSwitch
Telnet.Read Until \#
Telnet.Write end
Telnet.Set Prompt \#
${out}= Telnet.Execute Command show run | inc hostname
The above script login to the DUT and then configuring hostname.
The last line am trying to store the output value to variable named out [ "${out}= Telnet.Execute Command show run | inc hostname" ]
Am expecting the test case should pass if the value stored in out is same which is configured .
The test case should pass based on the hostname set properly what we given.
Thanks,
Manikandan.G