I am starting to work with QTP 9.2, with Terminal Emulator (TE) for WRQ Reflection (no support of HLLAPI).
As simple test case, I am trying to execute a simple "who am i" instruction.
<font class="small">Code:</font><hr /><pre>
set myTeTextScreen = TeWindow("TeWindow").TeTextScreen("TeTextScreen")
myTeTextScreen.Type "who am i"
I have put Sync 100 because sometimes, the execution takes some milliseconds before executing and QTP test has to wait for the answer of the instruction.
- How to "wait for the answer", instead of "waiting for 100ms"?
For example, my next test case is to download a file and I can not determine the expected time of download.
- So, how can the test action know when the wget instruction is finished?
- What are your advice in such a case?
I'll recommend staying away from Sync when using TE. I've experimented with both and wait came out winner.
01. LR 11.1 (Patch 3)
02. Web(HTTP/HTML) URL method
05. LoadRunner 11.1
07. Subscription - 5000 Web and Multimedia
09. Win Vista Enterprise SP2/Ubuntu Linux 10.04 LTS/Solaris
10. I haven't filed one.
Wait(100) will wait 100 seconds, that is inefficient.
Vince if you want to wait 100 miliseconds use:
For longer waits you should analyse what response you are waiting for and code for that. I'm not TE addin savvy, but in web I would do something like, say I was waiting for a Continue button I could do something like: