Unified Functional Testing (formerly QTP) News and Support Forum
Showing results for 
Search instead for 
Do you mean 

HP UFT, How can it Click on ActiveX FlexGrid Row 20 and Column 10?

Highlighted
Occasional Visitor

HP UFT, How can it Click on ActiveX FlexGrid Row 20 and Column 10?

Hi,

I am using HP UFT 11.52 and I cannot figuire out

How can it Click on ActiveX FlexGrid Row 20 and Column 10?

I am using infragistic also.

 

I  find out How many Rows and Columns are there in this ActiveX FlexGrid screen.

 

msgbox SwfWindow("HostWnd").VbWindow("frmView").ActiveX("progid:=").GetROProperty("Rows")

 

it will tell me how many rows are there.

 

msgbox SwfWindow("HostWnd").VbWindow("frmView").ActiveX("progid:=").GetROProperty("Cols")

 

It will tell me how many columns are there.

 

Then I need it to click on Row 20 and Column 10.

How do I do that?

 

Anyone KNows? Please Help. Thanks.

 

1 REPLIES
Occasional Visitor

Re: HP UFT, How can it Click on ActiveX FlexGrid Row 20 and Column 10?

I think I found it.

I Tried This and Worked.

 

First We need to Find the X, Y location based on where your text exist.

 

nLocation = SwfWindow("").VbWindow("").ActiveX("progid:=").GetTextLocation("You Text looking for" ,l,t,r,b,True)

 

'  l is your left and t is your top

'  you may also try to add 2 or 3 to l and 2 or 3 to t and then use

 

l = l + 2

t = t + 2

 

SwfWindow("").VbWindow("").ActiveX("progid:=").Click l,t

 

It will click on the text that you are looking for.