Forum Discussion

mfoster711's avatar
mfoster711
Regular Contributor
10 years ago

TC11 Findchild extremely slow

I have the following code in my project:

    Set UsernameTextbox = Sys.FindChild(Array("ObjectType","ObjectLabel","VisibleOnScreen"),Array("Textbox","Username","True"),10,True)
    Set PasswordBox = Sys.FindChild(Array("ObjectType","ObjectLabel"),Array("PasswordBox","Password"),10,True)
    Set SignOnButton = Sys.FindChild(Array("ObjectType","ObjectLabel"),Array("SubmitButton","Sign On"),10,True)

In TestComplete 11, each of these lines take 40 seconds to complete (i.e. it took 2 minutes to finish all 3 lines). In TestComplete 10 it takes less than a second for these 3 lines to complete.

 

Why is it take so long for the FindChild to complete in TestComplete 11??

 

These tests were run using IE 11 and Firefox 37. I had the same results in each browser.

 

I am using TC 11.10.1005.7

  • scsvel's avatar
    scsvel
    Frequent Contributor

    I suggest you to tell TestComplete to go and find the objects with in the specific browser you are going to run.

     

    Set UsernameTextbox = Sys.Process("iexplorer").FindChild(Array("ObjectType","ObjectLabel","VisibleOnScreen"),Array("Textbox","Username","True"),10,True)
    or
    Set UsernameTextbox = Sys.Process("chrome").FindChild(Array("ObjectType","ObjectLabel","VisibleOnScreen"),Array("Textbox","Username","True"),10,True)

    If you ask TC to find blindly on the whole system, then obviuosly it would take lot of time. Have some Project Variable for whic browser to run and select the browser while start running.

    • mfoster711's avatar
      mfoster711
      Regular Contributor

      I understand, but that doesn't explain why the exact same code in TC10 takes only one second to process but TC11 takes two minutes.

  • colinstrydom's avatar
    colinstrydom
    Occasional Contributor

    I just want to add my experience here. Test Complete and Test Execute is extremely slow in after version 11 update. There are huge delays in finding windows and objects.

     

    I'm not sure what happened, tests are taking more than double the amount of time. From what I've read, it is not isolated to a certain type of testing or application

     

  • Bobik's avatar
    Bobik
    Frequent Contributor

    You shouldn't use FindChild for Sys object because in this case  TestComplete will search inside all running processes.
    Better practice is to search objects inside the needed process. It will take less time.
    If you don't want write browser name then use Sys.Browser().FindChild(<params>) object.

     

    Maybe TestComplete 11 now tries to search from another end of the process list and it causes "slow" speed.  :)

    • mfoster711's avatar
      mfoster711
      Regular Contributor

      While I agree that you should always try searching from the most sepcific object you can, unfornuately, that is not always possible. 

       

      I turned in a support ticket for this and they acknoledged the issue and turned it over to their developers. In the example I gave to Smartbear support, I have 3 lines of code that used Sys.Findchild and these 3 lines took less than a second to complete in TC10 and are taking over 2 minutes to complete in TC11. I repeated the test multiple times in the exact same environment and TC10 was always less than a second and TC11 was always over 2 minutes. This is not an issue with my code, it is an issue with TC11.

       

      Edit: I was running my tests using IE 11, Firefox 37 and Chrome 45. All of them took over 2 minutes when running the test in TC11. I see many other threads where people are having slowdowns in Chrome and made it sound like this is a Chrome only issue but in my experience this is a global TC11 issue.

      • mfoster711's avatar
        mfoster711
        Regular Contributor

        This is a very frustrating situation. This break means we have had to hold off on upgrading all our PCs to use TC11. This always means we are unable to do any Google Chrome testing because you have to have TC11 to test Chrome 45.

  • Plenty of other threads open with same issue. its also the same with findchildbyxpath

     

    i gave example that one of my tests in IE11 completes in 129 seconds but in Chrome it now take 450+ seconds!