Ask a Question

Unable to focus the control

SOLVED
ApisathS
New Contributor

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?

ApisathS_0-1635443757171.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
hkim5
Staff

Re: Unable to focus the control

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

Best,
Justin Kim

View solution in original post

4 REPLIES 4
hkim5
Staff

Re: Unable to focus the control

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

Best,
Justin Kim

View solution in original post

ApisathS
New Contributor

Re: Unable to focus the control

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 🙂 

hkim5
Staff

Re: Unable to focus the control

any updates?

Best,
Justin Kim
ApisathS
New Contributor

Re: Unable to focus the control

@hkim5 
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 🙂

 

ApisathS_0-1635517336203.gif

 

cancel
Showing results for 
Search instead for 
Did you mean: