Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP 9.5 - Select an element in a table
#2
Solved: 12 Years, 10 Months, 3 Weeks ago
Hi SAKDOSS ,
Code:
If Browser(X).Page(X).WebTable("index:= Here mention UR table index").Exist Then
    ColNum = Browser(X).Page(X).WebTable("index:= Here mention UR table index").ColumnCount(1)
        DesiredColNum = 0
        For colint = 1 to ColNum
            If Browser("SAM").Page("SAM").WebTable("Database:").GetCellData(1,colint) = "Column2" Then
                DesiredColNum = colint
                Exit For
            End If
        Next
        If DesiredColNum <> 0 Then
            For rowint = 1 to Browser("SAM").Page("SAM").WebTable("Database:").RowCount
                    rowval = Browser("SAM").Page("SAM").WebTable("Database:").GetCellData(rowint,1)
                    If rowval = "k" Then
                        DesiredRow = rowint
                        Exit for
                    End If
            Next
        Else
            MsgBox "Column2 is not displayed in the specified table."
        End If
        
        MyValue = Browser("SAM").Page("SAM").WebTable("Database:").GetCellData(rowint,DesiredColNum)
        msgbox MyValue
        
Else
    msgbox "Specified WebTable with ''" & Here mention UR table index & "'' is not present."
    ExitRun
End If

Please let me know if you need any more info.
Thanks,
SUpputuri
Reply


Messages In This Thread
RE: QTP 9.5 - Select an element in a table - by supputuri - 07-30-2009, 10:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Page element keep changing chong67 4 5,208 11-08-2016, 09:17 PM
Last Post: Paul Rammone
  Choosing element from array marvson 1 2,375 06-29-2016, 02:55 PM
Last Post: Ankesh
  Web Element: Not able to select value from drop down in Web Element. Rajeev 4 5,964 08-04-2015, 06:03 PM
Last Post: kbhargava505
  Multi Select in UFT/ QTP vanga 0 3,853 02-25-2015, 07:03 PM
Last Post: vanga
  How to capture tool tip within a web element frebuffi 3 4,289 11-10-2014, 10:06 AM
Last Post: learning_UFT

Forum Jump:


Users browsing this thread: 1 Guest(s)