List Icon
Archive de la liste de diffusion

La liste de diffusion est fermée depuis juillet 2022, mais sert toujours d'archive d'informations sur QF-Test.
Cependant, si vous souhaitez rester informé des nouveautés concernant QF-Test, vous pouvez simplement vous
abonner à la newsletter 

our obtenir des informations à jour sur chaque version - y compris les versions mineures - vous pouvez
nous pouvez vous abonner au flux RSS ou nous suivre sur les médias sociaux.
Alternativement, QF-Test fournit également des informations sur la version elle-même.

Une autre source d'information est notre blog, qui contient des articles actuels sur des thèmes généraux, sur l'entreprise QFS et aussi divers "how-tos", veuillez vous
ABonner au 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