Micro Focus QTP (UFT) Forums
Find or Search method - 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: Find or Search method (/Thread-Find-or-Search-method)



Find or Search method - mv8167 - 03-13-2012

I have been trying to use the Find or Search methods on an html page. But I am having no luck and I dont find much online

The QTP has object.Find (PropertyName) but that;'s it.

I have tried the following with no luck:


Code:
Set TableObj = Browser("Fax Request").Page("Page").WebTable("Fax Status")

            If Browser("Fax Request").Page("Page").WebTable("Fax Status").Search (FaxName) Then
                Browser("Fax Request").Page("Page").WebElement("innertext:=" & FaxName ).Highlight
            End If

            If TableObj.Find ("innerText:" & FaxName) Then
                Browser("Fax Request").Page("Page").WebElement("innertext:=" & FaxName ).Highlight
            End If

            If TableObj.Find.MatchWholeWord (FaxName) Then
                Browser("Fax Request").Page("Page").WebElement("innertext:=" & FaxName ).Highlight
            End If

And other varations.

Does anyone use Search or Find on an html page that can give me an idea on how to use these two methods?