If you want to find all matches in a webtable, then we have to override the GetRowWithCellText method using RegisterUserFunc as below,
RegisterUserFunc "WebTable","GetRowWithCellText","NewGetRowWithCellText"
Function NewGetRowWithCellText(obj,val1,val2,val3)
Dim v_st_returnText
Set objRow=obj.Object.getElementsByTagName("TR")
If val2<>0 Then val2=val2-1
If val3<>0 Then val3=val3-1
For i=val3 to objRow.Length-1
If val1=Trim(objRow(i).getElementsByTagName("TD")(val2).InnerText) Then
If v_st_returnText="" Then
v_st_returnText=Cstr( i+1)
Else
v_st_returnText=Cstr( i+1)+","+v_st_returnText
End If
End If
Next
NewGetRowWithCellText=v_st_returnText
End Function
Msgbox Browser("name:=QTP Codes").Page("title:=QTP Codes").WebTable("index:=0").GetRowWithCellText("Cell3",1,1)
Thanks for your code. Please explain the code to get clear idea about it.
ReplyDeletehttps://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
46MB6