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 :
abonner à la newsletter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [QF-Test] Is it possible to wait for two components simultaneously?
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
|
1. Cookies fonctionnels
Nous utilisons des cookies fonctionnels pour garantir la fonctionnalité de base du site web.
2. Cookies de performance et de statistique
Nous utilisons Matomo pour analyser et améliorer notre site web. Des cookies permettent une collection anonyme des informations qui nous aident à vous offrir un visite clair et facile à utiliser de nos pages web.
This cookie contains a unique, pseudonymized visitor ID internal to Matomo for recognizing repeat visitors.
This cookie is used to track from which website the anonymized user proceeded to any page or sub-page.
The Matomo session cookie is used to track the visitor's page requests during the session. The cookie is automatically deleted at the end of each session (website visit), at the latest after one day.
is created and should be then directly deleted (used to check whether the visitor’s browser supports cookies).
short lived cookies used to temporarily store data for the visit.
short lived cookies used to temporarily store data for the visit.