Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selecting image in swftable
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi

I am automating Windows based application through QTP with the help of .Net addin.

There is a swftable(many rows and 6 columns). I want to select the image present at Row1 and Column 1.

I have tried clickcell,selectcell and activate cell method but nothing is working. Please tell me how to click the image at(1,1).

Thanks
-Taran
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Use ChildItem And ChildItemCount method, better go through QTP help manual.
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Taran,
try GetCellData

object.GetCellData (Row, Column)

the sample bellow is for web, try to use it for windows elements, by changing the objects from web to windows:
Code:
Browser(..).Page(..).WebTable("micclass := WebElement" , "class := obj_Class", "Html Tag := TD", "Text := obj_Text", "Index:=obj_Index").GetCellData("1", "1")

here is a sample for .NET Windows Forms, Get Data from a Specified Cell in an 'Infragistics UltraWinGrid' Control :
Code:
Sub GetCellData_Example1()
'The following example uses the GetCellData method with Infragistics UltraWinGrid control to return the data
'contained in the second row of the "Description" column within the second band level.
MyData = SwfWindow("Layouts").SwfTable("gridOne").GetCellData("0;1", "Description")
MsgBox MyData
End Sub

and another one, Get Data from a Specified Cell in a 'DevExpress XtraGrid' Control:

Code:
Sub GetCellData_Example2()
'The following example uses the GetCellData method with DevExpress XtraGrid control to return the data contained
'in the third row of the "CustomerID" column within the "Orders" view.
SwfWindow("MasterView").SwfTable("gridControl1").SetView "3 Orders;"
SwfWindow("MasterView").SwfTable("gridControl1").SelectCell 2, "CustomerID"
MyData = SwfWindow("MasterView").SwfTable("gridControl1").GetCellData("2", "CustomerID")
MsgBox MyData
End Sub

see within the QTP Help: GetCellData Method (Swf Table)

I hope it will help you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Searching for and selecting row in Datawindow zsl0009 0 2,792 08-04-2015, 01:02 AM
Last Post: zsl0009
  Problem selecting in a dropdown menu during playback. qemls29 9 12,998 07-28-2015, 05:44 PM
Last Post: Sharan
  Selecting Link Magad 1 2,808 11-07-2014, 03:56 AM
Last Post: PrateepKaraval
  selecting values from the dropdown webelement poojaarora014 3 18,007 04-22-2014, 12:12 PM
Last Post: basanth27
  Selecting child node from Wintree object ajith123 2 5,300 02-26-2014, 02:12 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)