Ask a Question

how to wait for data change in same object

SOLVED
nakshatra
Contributor

how to wait for data change in same object

Hi All,

 

I have one object it will display 2 different values. 

1. Loading data.

2. Search result-(100)

 

Object name in namemapping: Aliases.browser.panel.searchobject

Actions:

After clicking on search button. First Loading Data will display and after some time serach result-(100) will get display.

 

Now I need to check the count with property check point. But my test case is getting failed. Before coming search result data it is taking Loading Data and performing comparision.

 

Can anyone help me how to wait up to the data change.

 

Thanks in Advance.

 

Regards,

Nakshatra

2 REPLIES 2
tristaanogre
Esteemed Contributor

Here is a piece of code that we use for something similar in our web application.  I'd recommend adapting this for your situation to wait for the Loading to go away before proceeding.

 

function waitForLoading(timeout) {
    var loadingForm;
    var counter = 0;
    if ((timeout == undefined) || (timeout == null)) {
        timeout = 60;
    }
    if (Aliases.browser.WaitAliasChild('panelLoading', 10000).Exists){
        Aliases.browser.panelLoading.RefreshMappingInfo();
        Aliases.browser.panelLoading.WaitProperty('Visible', true, 5000);
        while ((Aliases.browser.panelLoading.Visible) && (counter < (timeout * 2))){
            aqUtils.Delay(500, 'Waiting for loading panel to close');
            counter++
        }    
    }
}

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

Thanks for the reply.

 

It's working.

 

Regards,

Nakshatra.

 

 

cancel
Showing results for 
Search instead for 
Did you mean: