Re: how do i use page text method...



positive mind wrote:
i have a query...

i am using the Win 32 package for IE automation on Windows. can somebody
please help me in using PageText() method ...

i have to capture the page text in a variable from a simple html
page.Thetext is in the format of few variables like USERNAME=pm,
HTTP_CONNECTION=keep-alive etc....from this page, i have to search for a
particular variable say USERNAME and its value.. then i have to print it..

any ideas how can i do that..am beginer in Perl so not much idea..

i tried to do something like this to simply capture all the data...from that
page

$ie->PageText();
print "$ie ";

but it returns me value like this Win32::IEAutomation=HASH(0x224f38)...


$ie is the Win32::IEAutomation object and PageText is a method for this object
that returns the text in the current web page. At the moment you are retrieving
this text and immediately discarding it when you need to save it in a scalar
variable:

my $text = $ie->PageText;

The program below may help you.

Cheers,

Rob



use strict;
use warnings;

use Win32::IEAutomation;

my $ie = Win32::IEAutomation->new;
$ie->gotoURL('http://search.cpan.org');
my $text = $ie->PageText;
$ie->closeIE;

print $text;

.



Relevant Pages

  • how do i use page text method...
    ... i am using the Win 32 package for IE automation on Windows. ... please help me in using PageText() method ... ... i have to capture the page text in a variable from a simple html ...
    (perl.beginners)
  • Re: How to capture visible text from Command Window
    ... The reason i need to capture the console text is - I am trying to ... write a .NET plug-in to be used in a automation tool liek QTP to ... Since AFAIK Windows doesn't know anything about the text displayed in a   ...
    (microsoft.public.dotnet.languages.csharp)