Forum Discussion

nakshatra's avatar
nakshatra
Contributor
6 years ago

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: Afte...
  • tristaanogre's avatar
    6 years ago

    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++
            }    
        }
    }