Can you help me get the current URL where I am located (after login)?
use strict;
use WWW::Mechanize;
use HTTP::Cookies;
my $urlActual;
my $url = "xxxxxxxxxxxxxx";
my $palabra;
my $username = 'xxxxxxxxxx';
my $password = 'xxxxxxxxxxxxx';
my $mech = WWW::Mechanize->new();
$mech->cookie_jar(HTTP::Cookies->new());
$mech->get($url);
$mech->form_name('menubar_login');
$mech->field(txt_login => $username);
$mech->field(txt_clave => $password);
$mech->click();
my $app_content = $mech->content();
$urlActual = top.frame.location.href
Printf($urlActual)
I miss an error in the penultimate line.
Edited:
And after receiving some answers about using $mech->uri()
, I find the error: