Thread

Posted on Wed Nov 23 13:48:30 2005 by jstenzel
title() does not reflect title changes
Hello,

when changing the title of an W32::IE::M object window, the title() method does not reflect that change.

# load modules use Win32::IE::Mechanize; use Win32::GuiTest qw(:ALL); # build IE object my $ie=Win32::IE::Mechanize->new(visible => 1); # enter page my $url="..."; $ie->get($url); # modify and report page title my $ieHandle; WaitWindow($ie->title, 10); WMSetText($ieHandle=(FindWindowLike(undef, $ie->title))[0], 'New title'); warn('Configured page title is "', $ie->title, qq(".));

Regards

Jochen Stenzel

Direct Responses: 1398 | Write a response
Posted on Thu Nov 24 01:38:14 2005 by abeltje in response to 1387
Re: title() does not reflect title changes
As documented, the title() method reflects the contents of the <TITLE></TITLE> tag in the HTML document. The fact that IE uses that to set the title of the window does not imply that changing the window title changes the content of the HTML document.

HTH
-- Abe.
Direct Responses: 1400 | Write a response
Posted on Thu Nov 24 12:27:44 2005 by jstenzel in response to 1398
Re: title() does not reflect title changes
Hm, yes, I confess I didn't reread the docs when I added the window title change, sorry. And of course it's true that window and document title are technically different. By the way, the docs just say "fetch the title from the $ie->Document", but Document() is no documented method. Jochen Stenzel
Direct Responses: 1403 | Write a response
Posted on Fri Nov 25 12:07:29 2005 by abeltje in response to 1400
Re: title() does not reflect title changes
You are right. It now reads:
=head2 $ie->title Fetch the C<title> from C<< $ie->agent->Document >> (This is set to the contents of the C<< <TITLE></TITLE> >> tag). =cut
Write a response