Ask a Question

Unable to focus the control

Occasional Contributor

Unable to focus the control


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

Justin Kim
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 🙂 

any updates?

Justin Kim
Occasional Contributor

Your solution work 😁
YAYYYYYYYY. Thank You So much

I added couple of delays around the area that said "Unable to focus the control" and that fixed it 
Thanks again for you suggestion 🙂




Showing results for 
Search instead for 
Did you mean: