| || |
SQAWaitforPropertyValue, processor be damned
User Tom Ba (email@example.com) posted:
Dim Result As Integer
dim iWaitTime as integer
dim lStartTime as long
dim iReCheckTime as integer
dim iElapsedTime as integer
dim sExpectedValue as string
dim sActualValue as string
dim sControlObjRec as string
'Where are we going on Planet Quark, today?
'Please verify blaster is ready
sExpectedValue = "Enabled"
'Exactly which control is that, numbskull?
'How long do you want to wait before giving up and using water gun?
iWaitTime = 10 'seconds
'Lastly, please specify (in mparsec) how long between successive
iReCheckTime = 100 'e.g., one-tenth of a second
lStartTime = Timer
Select Case ucase(sExpectedValue)
Case "TWUE", "TRUE", "ENABLED"
sExpectedValue = "-1"
Case 'FAWLSE", "FALSE", "DISABLED", "UNCHECKED"
sExpectedValue = "0"
sExpectedValue = "1"
'Let it be
result = SQAGetProperty (sControlObjRec, sExpectedValue,
If Instr(lcase(sActualValue),lcase(sExpectedValue)) > 0 Then
'you found it, stop looking already
'What, didn't find it? Chill. Maybe try again.
Loop until lStartTime + iWaitTime <= Timer
'Now invoke your compare mechanism du jour, actual v. expected
----Original Message Follows----
Reply-To: "SQA Suite Team Test Users" <firstname.lastname@example.org>
To: "SQA Suite Team Test Users" <email@example.com>
Subject: RE: SQAWaitforPropertyValue
Date: Wed, 27 Mar 2002 20:18:45 +0530
In my opinion it will be better to put some delay in each iteration of the
- like Delayfor(1000). A continuous loop eats up so much processor time that
the process which will make the required value avialble in the field under
test, will get very little processor time to do the job.
Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com