List Icon
Mailing list Archive

2019 up to July 2022 | 20182017  |  2016  2015 2014 | 2013

The mailing list has been closed since July 2022, but continues to serve as an archive of information about QF-Test.
But if you want to stay informed about news about QF-Test, you can simply
Subscribe to Newsletter  

To get up-to-date information about each release - including minor releases - you can
subscribe to the RSS feed or follow us on social media.
Alternatively, QF-Test also provides release information itself.

Another source of information is our blog, where there are current articles on general topics, on the company QFS and also various "how-tos"
subscribe to blog


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

Re: [QF-Test] Is it possible to wait for two components simultaneously?


  • Subject: Re: [QF-Test] Is it possible to wait for two components simultaneously?
  • From: "Yann Spoeri, QFS" <yann.spoeri@?.de>
  • Date: Fri, 15 Jul 2016 10:22:46 +0200

Hello Bernhard,

I think, a procedure, that is looking like this:

 + Procedure: waitForTwoComponents
   Parameters:
     component1: # the first QF-Test component id of the component to wait for
     component2: # the second QF-Test component id of the component to wait for
     timeout: 1000
   + Jython Server Script
     Script:
from java.lang import System
rc.setLocal("timeout", System.currentTimeMillis() + rc.getInt("timeout"))
   + While
     Condition: True
     + Try
       Delay before: 30 # in order to reduce the system load
       + Wait for component
         Client: $(client)
         QF-Test component ID: $(component1)
         Timeout: 1
       + Break
       + Catch: ComponentNotFoundException
     + Try
       + Wait for component
         Client: $(client)
         QF-Test component ID: $(component2)
         Timeout: 1
       + Break
       + Catch: ComponentNotFoundException
     + Jython Server Script
       Script:
from java.lang import System
if System.currentTimeMillis() > rc.getInt("timeout"):
    raise ComponentNotFoundException()

is fitting your needs. This procedure is alternately looking for the appearance of one of the two components. Once one of these components gets
found, the while loop will get interrupted. Maybe in future the qfs.qft may contain a procedure like this.

Best regards,
    Yann

Am 12.07.2016 um 15:44 schrieb Bernhard Schmitt:
Hello,

I have a button. When I press the button, a new mask should open, but optionally, a modal dialog might  occur befor opening.
Now I have implemented a 'WaitForComponent(modal dialog, 5s). When the button does not occur, I am waiting
always the timeout of 5s. To save time I am searching  for a more flexible wait.
E.g. If I can wait for two components simultaneously, I will never wait for the timeout. Either the modal dialog or the new mask finish the wait.
Is this possible? Do you have other suggestions form my little problem?

Thanks & BR

Bernhard Schmitt

_______________________________________________
qftest-list mailing list
qftest-list@?.de
https://www.qfs.de/mailman/listinfo/qftest-list

Attachment: waitForComps.qft
Description: application/qftest