title: WWW:Mechanize Form Select
body: <p>I am attempting to login to Youtube with WWW:Mechanize and use forms() to print out all the forms on the page after logging in.  My script is logging in successfully, and also successfully navigating to Youtube.com/inbox;  However, for some reason Mechanize can not see any forms at Youtube.com/inbox.  It just returns blank.  Here is my code:</p>
  
  <pre><code>#!"C:\Perl64\bin\perl.exe" -T
  
  use strict;
  use warnings;
  
  use CGI;
  use CGI::Carp qw/fatalsToBrowser/;
  use WWW::Mechanize;
  use Data::Dumper;
  
  my $q = CGI-&gt;new;
  
  $q-&gt;header();
  
  my $url = 'https://www.google.com/accounts/ServiceLogin?uilel=3&amp;service=youtube&amp;passive=true&amp;continue=http://www.youtube.com/signin%3Faction_handle_signin%3Dtrue%26nomobiletemp%3D1%26hl%3Den_US%26next%3D%252Findex&amp;hl=en_US&amp;ltmpl=sso';
  
  my $mechanize = WWW::Mechanize-&gt;new(autocheck =&gt; 1);
  
  $mechanize-&gt;agent_alias( 'Windows Mozilla' );
  
  $mechanize-&gt;get($url);
  
  $mechanize-&gt;submit_form(
          form_id =&gt; 'gaia_loginform',
          fields      =&gt; { Email =&gt; 'myemail',Passwd =&gt; 'mypassword' },
      );
      die unless ($mechanize-&gt;success);
  
  $url = 'http://www.youtube.com/inbox';
  
  $mechanize-&gt;get($url);
  
  $mechanize-&gt;form_id('comeposeform');
  
  my $page = $mechanize-&gt;content();
  
  print Dumper($mechanize-&gt;forms());
  </code></pre>
  
  <p>Mechanize is unable to see any forms at youtube.com/inbox, however, like I said, I can print all of the forms from the initial link, no matter what I change it to...</p>
  
  <p>Thanks in advance.</p>