Micro Focus QTP (UFT) Forums
Search WebTable? - 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: Search WebTable? (/Thread-Search-WebTable)

Pages: 1 2


RE: Search WebTable? - surya_7mar - 07-06-2010

Code:
row = Browser("").Page("").WebTable("").GetRowWithCellText("GD APRS Nine,Internet,Jun 18 2010 4:57PM", 2, 7)

Set View = Browser("").Page("").WebTable("").ChildItem(3, 7, "Link", 0)

View.Click


Try this?


RE: Search WebTable? - sasmitakumari - 07-13-2010

Hi,

Can u provide snap shot of your webtable(part of it- with all columns in it with few rows"), which will help me to provide you sample code how to click on the link using DP?

Sasmita


RE: Search WebTable? - Brian T. - 07-14-2010

Thanks,

For all the help!

I was able to use the below code to search a web table for a specific Name(Andrew APRS Fox) and a specific Access Type(Internet)for the current date and once found click on the link in the 7th column for that specific request. Here is the code in case someone else has a simular issue.

Again Thanks for all the Help!

Code:
Dim objTable, intRow
Today = MonthName(Month(Now),True)&" "&Day(Now)&" "&Year(Now)

Set objTable = Browser("").Page("").WebTable("")
Rcount = 1
do until Rcount = objTable.RowCount +1
If objTable.GetCellData(Rcount, 1) = "Andrew APRS Fox" Then
If objTable.GetCellData(Rcount, 3) = "Internet" Then
If Mid(objTable.GetCellData(Rcount, 5),11,1) = " "
Then
covdate = Left(Today,10)
Else
covdate = Left(Today, 11)
End If
If covdate = Today Then
If objTable.GetCellData(Rcount, 6) = "PENDING APPROVAL " Then
Exit do
End If
End If
End If
End If
Rcount = Rcount + 1
loop
If Rcount = objTable.RowCount +1Then
msgbox "No Matching Records Found"
End If
Set View = Browser("").Page("").WebTable("").ChildItem(Rcount, 7, "Link", 0)

View.Click
Thanks,
Brian


RE: Search WebTable? - Arun Prakash - 07-19-2010

Hi Brian,

Code:
row = Browser("").Page("").WebTable("").GetRowWithCellText("GD APRS Nine,Internet,Jun 18 2010 4:57PM")

Set View = Browser("").Page("").WebTable("").ChildItem(row,7,"Link", 0)

View.Click

I hope the above code will solve your problem