HP UFT, How can it Click on ActiveX FlexGrid Row 20 and Column 10? (190 Views)
Reply
Occasional Visitor
azunaid
Posts: 3
Registered: ‎02-25-2014
Message 1 of 2 (190 Views)

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.

 

Occasional Visitor
azunaid
Posts: 3
Registered: ‎02-25-2014
Message 2 of 2 (182 Views)

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.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.