Micro Focus QTP (UFT) Forums
How to explicitly focus the cursor - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to explicitly focus the cursor (/Thread-How-to-explicitly-focus-the-cursor)



How to explicitly focus the cursor - sudhirzpatil - 02-11-2009

Hi can any one tell me how to focus the cursor on required field.


RE: How to explicitly focus the cursor - Prafulla - 02-12-2009

Try out something like this...

Code:
Browser("iGoogle").Page("iGoogle").WebEdit("q").FireEvent "onfocus"



RE: How to explicitly focus the cursor - sudhirzpatil - 02-12-2009

No Prafulla
It gives following error.

bject doesn't support this property or method: 'dialog(...).WinEdit(...).FireEvent'

But i got it

Its SetCaretPos(column)


RE: How to explicitly focus the cursor - Prafulla - 02-12-2009

Hey Sudhir...

Code:
Browser("iGoogle").Page("iGoogle").WebEdit("q").FireEvent "onfocus"
..working perfectly fine...FireEvent is webEdit’s method and not for WinEdit..so obviously it wont work for it…


RE: How to explicitly focus the cursor - sudhirzpatil - 02-12-2009

Okie , Yes Prafulla
Thnks for pinpoint my mistake