ys but in this case you have to need shortout the objects having innertext,
but you can leaves some objects based on html tag.
systemutil.Run "iexplore","www.gmail.com"
Set a=Browser("creationtime:=0").
page("micclass:=page").ChildObjects
b=a.count
msgbox b
For i=0 to b-1
d=a(i).getroproperty("innertext")
m=a(i).getroproperty("html tag")
If d=" " and m=B Then 'not print those object name in which html tag
type B
i=i+1
else
e=a(i).getroproperty("name")
print "object name"&e
End If
print"loop no---" &i
Next
On Wed, Aug 22, 2012 at 2:47 PM, Gajendra Jain <[email protected]>wrote:
> Hi,
>
> Is there way i can ignore the innertext of the some specific Html tag?
>
> Regards
> Gajendra
>
>
> On Tue, Aug 7, 2012 at 9:46 PM, Akhalesh Yadav <
> [email protected]> wrote:
>
>> print objects who have innertext property
>>
>> systemutil.Run "iexplore","www.gmail.com"
>>
>> Set a=Browser("creationtime:=0").
>> page("micclass:=page").ChildObjects
>> b=a.count
>> msgbox b
>> For i=0 to b-1
>> d=a(i).getroproperty("innertext")
>>
>>
>> If d=" " Then
>> i=i+1
>> else
>> e=a(i).getroproperty("name")
>> print "object name"&e
>> End If
>> print"loop no---" &i
>> Next
>>
>>
>> On Tue, Jul 31, 2012 at 7:56 AM, Parke Kuntz <[email protected]>wrote:
>>
>>> Gajendra:
>>>
>>> The following lists how to get information from a web page such as
>>> micclass, name, innertext. Some of the objects will not have any
>>> innertext so you will need to decide how you wish to filter.
>>>
>>> When this was executed against google.com, there were 70 objects and
>>> only 57 had a value in the innertext.
>>>
>>> The info could be put into a txt file, word doc, excel spreadsheet.
>>> Your choice.
>>>
>>> Set a=Browser("creationtime:=0").page("micclass:=page").ChildObjects
>>> print "number of child objects = " & a.count
>>> For i=0 to a.count-1
>>> print a(i).GetroProperty("text")&": micclass
>>> "&a(i).getroproperty("micclass") & ": name " &
>>> a(i).getroproperty("name") & ": innertext " &
>>> a(i).getroproperty("innertext")
>>> Next
>>>
>>> print vbcrlf
>>> ''// ignore objects with no innertext
>>> cnt_notempty = 0
>>> For i = 0 to a.count - 1
>>> If a(i).GetROProperty("innertext") <> "" Then
>>> cnt_notempty = cnt_notempty + 1
>>> print a(i).GetroProperty("text")&": micclass
>>> "&a(i).getroproperty("micclass") & ": name " &
>>> a(i).getroproperty("name") & ": innertext " &
>>> a(i).getroproperty("innertext")
>>> End If
>>>
>>> Next
>>>
>>> print "cnt_notempty = " & cnt_notempty
>>>
>>> hth,
>>>
>>> Parke
>>>
>>> On 7/31/12, Gajendra Jain <[email protected]> wrote:
>>> > Hi,
>>> >
>>> > How can i capture the innertext of the whole webpage and save it in the
>>> > word document?
>>> >
>>> > Regards,
>>> > Gajendra
>>> >
>>> > --
>>> > 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
>>> >
>>>
>>>
>>> --
>>> Parke
>>> Cell: 770-842-0121
>>>
>>> --
>>> 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
>>>
>>
>>
>>
>> --
>> Akhalesh yadav
>> +919555717928
>> +919310680659
>>
>> --
>> 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
>
--
Akhalesh yadav
+919555717928
+919310680659
--
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