Mailing List - Entries of 2016
[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