Forum Discussion

che_chethan's avatar
che_chethan
Contributor
12 years ago

IE 8 response is slow and hangs when test complete checks for visible property of a control during search operation

Hi,



I am facing an issue with IE8 while performing visible property check on a control during search operation.

please find the detailed scenario below:



We are automating search functionality on our web application which performs the following steps:

1. Type search string in the search textbox

2. Click on Search button

3. Click on the required link from the generated search results (this results in opening a new page in the same window and happens to be an ajax call - loading image rotates until the page is loaded)

4. Wait operation is executed to wait for the loading image's visibleonscreen property to be false.



Issue:

1. Application loads the redirection page in 5-7 seconds when this scenario is tried manually but when TC executes the same, takes more than 15-20 seconds.

2. First time the TC code checks for the loading image, it works fine and moves ahead with the execution. Second time (for a different search string) when clicked on the results link, while the page loads the content, the loading image appears, when TC tries to create object for this control, it hangs and surprisingly, page load operation also halts for atleast a minute and then once TC assumes to have the control, page loads and moves ahead with the execution.



Here is the code snippet to wait until ajax (loading image) call turns the visibleonscreen property of the loading image to false:




var browser = Sys["Browser"]("*");


     var page = browser["Page"]("*");


     


     do


     {


      //page["Refresh"]();


      obj = page["FindChild"](key,value,500,true);


  


      if(obj != null && obj["Exists"])


      {


        if(!(obj["VisibleOnScreen"] == true))


        {


            result = true;


            break;


        }


      }


      else


      delay(1000);

}while(pgLoadAttempt < totalWaitTime)



Key = "alt" and value = <<text expected to be the tooltip of the loading image>>



Kindly help me resolve this issue.



Thanks,

Chethan
  • I think you should move the FindChild call out of the loop and reduce the search scope by using more specific parent object and smaller depth. Try to debug this code line by line and see what line takes much time.
  • Hi,



    I have tried all possible combinations. Actually when i debug the code, the first time it works fine but later on, it hangs at the step where the page object is created

    var page = browser["Page"]("*")
  • Hi,



    Kindly let me know if there is a solution to resolve this issue.



    Regards,

    Chethan