Text of a Putty Dialog
I'm currently evaluating TestComplete and I'm looking at things we did in QTP to see if it works in TestComplete. The thing I'm currently looking at is getting the Text out of the Putty Dialog. I don't see anything that allows it, but was wondering if anybody has found it. I'm assuming that it would be similiar to getting the text out of a command dialog.
Note: In QTP the command is GetVisibleText
Re: Text of a Putty Dialog
You can copy the contents of the PuTTY window to the clipboard and work with it in a TestComplete script by using the Sys.Clipboard property. As soon as you get the needed text, you can use the indexOf method or a regular expression to find out whether the text matches a specific search pattern. Please see the "Working With Strings" help topic for information on these features and some sample scripts.
The following code snippet gets the output of the PuTTY window and prints it to the log:
<font class="small">Code:</font><hr /><pre>
var w = Sys.Process("putty").Window("PuTTY", "*", 1);
w.SystemMenu.Click("Copy All to Clipboard");
Does this help?