Mailingliste - Einträge 2005

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] Timeout attribute versus Wait for absence attribute

  • Subject: Re: [qftestJUI] Timeout attribute versus Wait for absence attribute
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Sun, 07 Aug 2005 12:12:02 -0000

Hello Raphael,

you need to do it the other way round.

The timeout in a check is a maximum value. If your dialog only appears
after a second or two, the check for absence will succeed immediately!

Instead, you need to wait for the dialog to appear. Use a normal wait
for component node with "Absence" unchecked as follows:

+ Try
  + Wait for component (error dialog)
  + Throw Exception "Error Dialog Appeared" (or just log an error and
                                             close the dialog)
  + Catch ComponentNotFoundException (everything fine)

Of yourse you'll incur the maximum delay for the timeout in case the
dialog doesn't appear, but in that situation, that can't be helped.

Best regards,

Raphael Neu <raphael.neu@?.com> writes:

> Hi,
> I'am using version version 1.08.2-p4. I use some "Wait for component"
> nodes in order to test the absence of an error modal dialog. I set the
> Timeout attribute to 5000 milliseconds and check the "Wait for
> absence" checkbox. Note that the "Wait for component" node is alone in
> a try-catch[component found exception] statement.
> As the error dialog take some time to appear (1-2 seconds), I expected
> that the node will wait 5 seconds before deciding that component did
> not appear and continue to the next step.
> However, it is not the behavior I experience there. the next node is
> called immediately. As a workaround, I use the "delay before"
> attribute, but the waste of time (5 seconds when error could appear in
> 2 seconds) may become a problem as I have a bunch of such test to do.
> There is no word on interaction between Timeout and Wait for absence
> attributes in the help, and I didn't found something similar in the
> mailing list archive. That's why I am asking the question:
> Is "Timeout" attribute ignored if "Wait for absence" attribute set to
> true?  What is the theorical behavior in my case?
> thanks in advance,
> Raph

Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH           
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876