Forum Discussion

hkrishnachandar's avatar
hkrishnachandar
New Contributor
11 years ago

Accurate Measurement of PopUp Window Load Time

Hi SmartBear,



I am working on a Silverlight Portal and using UI Automation Technology to access the Web Page objects.



My requirement is to gather time taken for a popup window to appear when right click on a context menu option or double click on a grid row.



I observed that the Object tree refresh takes considerable amoungt of time and hence using FindChild method also does not seem to be accurate.



Could you please let me know a faster and efficient way to achieve the same.



Thank you,

Hamsa

1 Reply

  • jose_pita's avatar
    jose_pita
    Super Contributor
    Can you provide the script code you use to click the object and the object you are supposed to find to terminate the counter?



    I use something like this:



    function countTime(objectToClick, objectToAppear)

    {

        var counter=0;

        objectToClick.Click()

        while(!objectToAppear.Exists && !objectToAppear.visibleOnScreen)

        {

            delay(1);

            counter = counter++

        }

        Log.Message("It took " + counter + " miliseconds to appear")

    }