Load runner Ajax Tru Client Wait for object not found?
In my application when ever you use some functionality a loading bar appears. In Tru Client I want to end the step whever this loading bar dissappears.
i.e. I want to implement "Wait For object not found"
how can i achive this.
We will consider adding such an end event in future version.
Meanwhile you can workaround that either by
> Looping around the object as long as it is visible. When it will disappear the step that looks for it will fail, you should catch the failure with catch statement and break the for loop from within the catch
The "not found" functionality actually does exist in TruClient 12.02. To get this behavior:
- add an "IF .. . EXISTS" step to the script
- run your script so the nasty unwanted object appears, then get the object path to it in the "IF . . . EXISTS" step.
- leave the condition blank. This means if the object is found, do nothing.
- and add an ELSE condition to the IF . . . EXISTS step. This means if the object is NOT found, do some action. The action could be to wait, or to repeat a previous action.
- Set the object timeout to something like 5 or 7 seconds. This means that if the object is not found within 5 or 7 seconds, the IF will move on to the ELSE part of the statement.
You now have a logic for deciding what to do if an object exists or not. I have a need for this kind of logic in a application which displays a circular "wait .. . processing" twirling icon on slow requests. The UI is blocked during this time and the script will time out unless I wait until the twirling icon disappears. So this functionality is needed but we do already have it.
I am also facing the same kind of issue, need to wait untill the spinner go off from Maps. Please let me know if there any solution how to handle with True Cliet web protocol. I need to end the transaction once the spinner disappear.
I am also facing the same problem in TC 12.53, where I am trying capture the spinning element using descriptors (Object property was Class, as I don't have unique id or input text) within a For loop. But it doesn't work.
Our business process is Hit a application URL with unique identifier and wait until the appropriate landing page gets loaded. At times, the landing page gets displayed in advance,but the spinning element appears in the UI.
Is there any workaround to mitigate the problem.
Is it possible for you to upgrade to a newer version? The wait for object step is much more flexible and allows waiting until innerHTML of an element is not equal to some value which can also be a regular expression. I am not sure if that will address your case, but it sounds more flexible to me.
Naive question, why do you need to captrue the spinning element at all? Wouldn't it be sufficient to wait until another element apepears on screen after the spinning element is gone?