refer to this

http://testeverythingqtp.blogspot.in/2011/04/highlight-text-on-page-using-qtp.html


On Tue, Apr 10, 2012 at 5:52 PM, Tirumala B <[email protected]> wrote:

> Hi Anish
>
> Thank u for quick reply. The code is work for WebElement, but  "user is
> tirumala" is a just string not any webelement.
>
> Thanks
> Tirumala
>
> On Mon, Apr 9, 2012 at 12:32 AM, Anish Pillai <[email protected]
> > wrote:
>
>> Hi Tirumala,
>>
>> If we assume that this text is a web element, you can try using this code
>> that uses child objects concept...
>>
>> flagFound = False
>>
>> Set oDesc = Description.Create()
>> oDesc("micclass").Value = "WebElement"
>>
>> Set oWebElement = Browser("").Page("").ChildObjects(oDesc)
>>
>> For i = 0 to oWebElement.Count - 1
>>   sTemp = oWebElement(i).GetROProperty("innertext")
>>   If InStr(1, sTemp, "user is tirumala", 0) <> 0 Then
>>      flagFound = True
>>      Exit For
>>   End If
>> End For
>>
>> If flagFound = True Then
>>     msgbox "WebElement Exists"
>> Else
>>     msgbox "WebElement doesn't Exist"
>> End If
>>
>>
>> *
>> Cheers,
>>  a n i s h
>>
>> [My QTP Blog] <http://www.automationrepository.com/>
>>
>> [Get New Posts in your 
>> Inbox]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
>>
>> *
>> --
>> ar
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>



-- 

Regards

*RAJIV <http://testeverythingrajiv.com/>
KUMAR<http://rajivkumarnandvani.wordpress.com/>
NANDVANI <http://testeverythingqtp.blogspot.com>*

http://rajivkumarnandvani.wordpress.com
http://testeverythingqtp.blogspot.com/

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to