Forum Discussion

ApisathS's avatar
ApisathS
Occasional Contributor
3 years ago

Unable to focus the control

Hi, 

Anyone has a solution to "Unable to focus the control" error message?

I have upgraded our TestComplete/TestExecute from 14.7 to 15.0, when I ran the script within TestComplete (locally) script PASSED without any issue. 
When I have execute the same script within Jenkins (TestExecute), the same script FAILED and got the error message of "Unable to focus the Control" 

The Details is saying: An attempt to focus the control failed. The control may be invisible, disabled, non-focusable, or it may pass focus to another control

 

Any suggestion? or solution to this?

 

 

  • without knowing any context on what kind of control it is, or what state the application is in just prior to this action, id have to guess (blindly):

    1. it may be using some sort of coordinates in the click action that seems to work for local env vs. pipeline env.

    2. timing issue (need longer auto wait timeout, delays between actions, or an explicit delay prior to this failure step) 

     

    which usually happens to be the source of issues for alot of web tests

  • without knowing any context on what kind of control it is, or what state the application is in just prior to this action, id have to guess (blindly):

    1. it may be using some sort of coordinates in the click action that seems to work for local env vs. pipeline env.

    2. timing issue (need longer auto wait timeout, delays between actions, or an explicit delay prior to this failure step) 

     

    which usually happens to be the source of issues for alot of web tests

    • ApisathS's avatar
      ApisathS
      Occasional Contributor

      Hmmm this could be a solution. 

      The application selected an item and it's supposed to click the "Next" button to the next page. 
      Im not using coordinate but using xPath instead. 

      Maybe I should try a longer delay (wait) and see. 

      Thank You hkim5 , will try this out and will let you know. 
      If you have found another solution, feel free to shoot it over 🙂