Loading ...
Sorry, an error occurred while loading the content.

1155Re: Navigate to a page in IE and pull text to determine success

Expand Messages
  • rmqa_group
    Oct 24, 2005
    • 0 Attachment
      I use code along the lines of:

      $IEpage = Win32::IE::Mechanize->new( <insert options as required> );
      $AMIIE->get(<insert web page address here>);
      $content=$IEpage->content;
      if ($content =~ /footer\.gif/i) #Look for image at bottom of page
      {
      print "go it\n";
      }


      It's easy enough to replace the image being searched for in the
      example above with some unique text (eg: copyright notice), though
      text tends to download before images, so it makes more sense to look
      for an image if you need to ensure the page has fully loaded.

      Hope this helps.
      DH

      --- In perlguitest@yahoogroups.com, saud aziz <saudaziz@g...> wrote:
      >
      > Try looking into selenium or Ruby's watir module for browser related
      > testing.
      >
      > On 10/6/05, boredsting <ddaigle@b...> wrote:
      > >
      > > I have combed through the posts and I am most of the way there.
      > >
      > > What I want to do is to navigate to a webpage.
      > > Login
      > > Pull text from the page to ensure that it has worked. This text
      will
      > > not be a link, at least my first one will not.
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      >
      >
      > --
      > "..man is a human being, not because of his physical powers for
      physically
      > the camel is his superior; not because of his size for the elephant
      is
      > larger; not because of his courage for the lion is more courageous;
      not
      > because of his appetite for the ox has the greater; not because of
      coitus
      > for the least of the birds is more virile than he, but rather by
      virtue of
      > his noble aims and ideals. [As a matter of fact] he was only
      created to
      > know." (Al- Ghazali; The book of Knowledge, Section 1)
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • Show all 4 messages in this topic