Forum Discussion
smartbearrj
7 years agoContributor
Hi AlexKaras,
Could you plz suggest how to use setFocus() method . I am finding in my log obj.SetFocus() is not a function.
Thanks,
AlexKaras
7 years agoCommunity Hero
> I am finding in my log obj.SetFocus() is not a function.
.SetFocus() exists not for all controls.
Check in the Object Browser if it exists for the given control.
P.S.
Some more universal code might be like this:
if (aqObject.IsSupported(<object>, 'SetFocus'))
<object>.SetFocus();
else
<object>.Click();