Hi, I suggest you avoid the Terminal Emulator method and try the one mentioned in this link. I have automated Putty in QTP in my previous company and the below method works like a charm
https://groups.google.com/forum/?hl=en#!searchin/mercuryqtp/Putty|sort:date/mercuryqtp/_A6R_oExiRk/nH791WlwT3MJ Regards, Gautham Maroli On Fri, Jun 28, 2013 at 8:08 PM, <[email protected]> wrote: > Hi > Could you please tell me how to add putty objects to the OR. I tried > adding it to the OR, but I am able to add only only Window name. After > right click on the Putty we get Menu item and I wanted to select some > options from the menu item. > Please let me know how to do this. > > Regards > Dev > > On Friday, April 8, 2011 8:38:30 PM UTC+5:30, Ganesh muralidharan wrote: >> >> Hi, >> >> Hope you have already carried out TE addin settings for putty. Pasted >> below is a function to login into putty and then entering the user id and >> pwd. >> >> >> >> '#************************************************************** >> ********************** >> '#Function Name : UdsLoginToPutty >> '#Description : Sub to Login to Putty >> '#Input Parameters : None >> '#Output Parameters: None >> '#************************************************************** >> ********************** >> Public sub UdsLoginToPutty(strGenUid, strGenPwd,strSwisslogUserName,** >> strSwisslogpwd) >> SystemUtil.run "C:\Program Files\PuTTY\putty.exe","","","**" >> >> With window("regexpwndtitle:=putty configuration") >> .activate >> .winedit("nativeclass:=edit",**"attached text:=Host.*").type >> "wmstst"'&servername or IP >> '.winedit("nativeclass:=edit"**,"attached text:=&Port").type >> &portnumber >> .winradiobutton("nativeclass:**=button","text:=&SSH").set >> .winbutton("text:=&open").**click >> End with >> wait(10) >> >> If TeWindow("TeWindow").exist Then >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type strGenUid >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type micReturn >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Sync 1000 >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type strGenPwd >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type micReturn >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Sync 2000 >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type >> strSwisslogUserName >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type micReturn >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Sync 1000 >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type >> strSwisslogpwd >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Type micReturn >> TeWindow("TeWindow").**TeTextScreen("TeTextScreen").**Sync 2000 >> End If >> End sub >> >> >> e.g. with descriptive programming below code sample : >> >> >> strval=Window("nativeclass:=**PuTTY").GetVisibleText >> If instr(strval,"Is location empty?") Then >> Window("nativeclass:=PuTTY").**Type "Y" >> Window("nativeclass:=PuTTY").**Type micReturn >> End if >> >> >> On Fri, Apr 8, 2011 at 9:59 AM, Shanmukha Bollapragada <[email protected] >> > wrote: >> >>> If anyone has any experience with putty and qtp. Please share. I need >>> to see a simple script example which will open putty, login into a unix box >>> with a specific username and password, and then issue a simple command like >>> ls -ltr, pasrse the resullts and return it to the user >>> >>> Thank you >>> Shan >>> >>> -- >>> You received this message because you are subscribed to the Google >>> "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> MercuryQTP+...@**googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/**group/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en> >> >> >> >> >> -- >> Regards, >> >> >> Ganesh Muralidharan >> 'God Never Forgets' >> > -- > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
