Forum Discussion

mithunpal2's avatar
mithunpal2
Contributor
6 years ago
Solved

Test Complete- Web testing - not recognizing yes button in warning page

in Web testing using test complete, it is not able to recognize yes button in the warning page?  how to solve this issue. thanks..

  • If it happens at full speed, then it is not a recognition issue, it's a timing issue.  My guess is that the yes button does not appear immediately on screen... that, after performing some action, there is a delay while a page loads or something and then the Yes button appears.

    Keep in mind that TestComplete is attempting to execute your actions as quickly as possible.  So, unless you explicitly tell it to wait until something is available, it will attempt actions.  You could mitigate this easily with a "Delay" call to have the automation wait but generally hard coded delays are not best practice as they aren't "smart" code.

    Review the topics under https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/index.html and see if you can implement something to wait for your object properly.

    Note, also, the warning that you have about "took too much time".  This is an artifact of the "Extended Find" feature.  If you go to the additional info tab on that warning, it will give you suggestions of what you need to do to mitgate that warning.  This warning could also be contributing to your object recognition issue.

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Have you used the Object Spy to make sure that you have things mapped properly?  For that matter, IS it mapped?  Can you post a screenshot of the mapping of the Yes button?  Also, if you step through the code slowly, does it find the button?  Is it something that only happens at full speed?

    In other words... there could be many reasons why it wouldn't recognize a button.  We need to know a  bit more about the nature of the problem.  Screenshots of properties, screenshots of name mapping, specific error messages being logged, etc.  All this would be helpful.

    • mithunpal2's avatar
      mithunpal2
      Contributor

      Thanks for your quick response. yes  i used object spy and if I step through the code slowly,  it find the button. and this issue is something that only happens at full speed.

      Please find the attachement what you have asked for. Thanks for all your help..

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        If it happens at full speed, then it is not a recognition issue, it's a timing issue.  My guess is that the yes button does not appear immediately on screen... that, after performing some action, there is a delay while a page loads or something and then the Yes button appears.

        Keep in mind that TestComplete is attempting to execute your actions as quickly as possible.  So, unless you explicitly tell it to wait until something is available, it will attempt actions.  You could mitigate this easily with a "Delay" call to have the automation wait but generally hard coded delays are not best practice as they aren't "smart" code.

        Review the topics under https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/index.html and see if you can implement something to wait for your object properly.

        Note, also, the warning that you have about "took too much time".  This is an artifact of the "Extended Find" feature.  If you go to the additional info tab on that warning, it will give you suggestions of what you need to do to mitgate that warning.  This warning could also be contributing to your object recognition issue.