HasFocus ( ) function gives Internal Error in agent.
getting "Error: Internal error in agent - Child not found" error when we
are executing our testcases. We did not find anything wrong with the code.
One of the case is that it checks whether a JavaJFCButton has focus. And we get
the above mentioned error for this code. See code attached.
2. In other cases it occurs at line 179 of defaults.inc. At this point it is in
DefaultTestCaseExit and in this functions it call setBaseState function.
defaults.inc is also attached for your reference.
[ ] *** Error: Internal error in agent - Child not found
[ ] Occurred in GetCloseWindows
[ ] Called from DefaultBaseState at defaults.inc(179)
[ ] Called from DefaultTestCaseExit at defaults.inc(338)
Re: HasFocus ( ) function gives Internal Error in agent.
This is probably because you called HasFocus before the app was ready. Either add a sleep or add an exception-handling retry mechanism. I don't use the default recovery system for reasons such as you describe in 2.
Chris R Mead
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.