Saving text as a variable
I am using TC3 and JScript.
How can I cut text from a area on the screen that pass this to a variable.
Example: TestComplete opens an application, selects help, captures the version number, passes this to a variable, then writes a log message "Version number is <Variable>"
Re: Saving text as a variable
Here is a sample script that does this with notepad:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">function Test()
var p, w
p = Sys.Process("notepad"
w = p.Window("Notepad", "*"
w = p.Window("#32770", "About Notepad"
VersionInfo = w.Window("Static", "Version*"
Log.Message("Version number is: " + VersionInfo.WndCaption)
}</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Please open Notepad before playing back the script.
To see how TestComplete can launch tested applications please read the "Tested Applications" Help topic.
Save on AutomatedQA Products