Forum Discussion
Hi AlexKaras,
1-- I am trying both - Keys(object ,string) and setText(object, string).
2-- I have not tried it yet. I am going to try setFocus and click()
Thanks,
> I am going to try setFocus and click()
Yes, please. While <object>.Keys() is expected to put required keys sequence into <object>'s input queue, I've seen the cases when the input was sent to (or intercepted by?) some other control. Explicit input focus setting to the required control always solved this problem.
- smartbearrj7 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,
> 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();
- smartbearrj7 years agoContributor
No Its is not havng SetFocus( ) method.
Also one more thing whcih i am seeing in my object browser -
However I can find the controls in the object browser with all its properties and methods , I can not see the control in the object preview .And I think this is the reason why keys are not sent ot the control!
I have attached the Screen shot below.