| || |
Attachmate Extra! Question
Hi, I am trying to write a script in TestPartner using the EXTRA! api. I have got most of it working, but I am having problems getting the WaitHostQuiet method to work correctly.
According to the included help Screen.waitHostQuiet(0) is supposed to wait until the 3270 busy indicator disappears. As Far as I can tell that statement is doing nothing. Next I tried giving it a wait value, but this also didn't work like I expected. I also tried assigning the return value of the method to a variable. As it turns out the value is FALSE when I run it at full speed, but becomes True when I step through the code.
Has anyone had luck with this method?
P.S. I am using Screen.Sendkeys method to write to the emulator.
Re: Attachmate Extra! Question
I have done a little bit with this, but its been a while. Is there a method that allows you to put the text into a field using a method?
Anyway... if not. Send keys or Guiobject.Type "Hello" will work.
The best way to syncronize TP and an emulator when not using the Com interface, is to use a combination of a Wait and whenever event.
1) Build a Whenever (Screen) event that looks for the existance of the busy indicator on the screen. X SYSTEM for example.
2) In the whenever function, create a WAIT (Screen) event that waits for the Busy Indicator to Not Appear
3) Add the Event code to your default script.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Sub Main()
Whenever "Emulator_Busy" ' Indicator present
'script stuff here
Private Sub Script_Whenever(ByVal TheEvent As TPEvents.TEventGroup)
If Wait(30, "Emulator_Busy", tpWaitSeconds) = True Then
UserCheck "app_fail", False, "The system was unavailable for 30 seconds, exiting test"
End Sub</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">