use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox->new( launch => '/path/to/firefox', ); $mech->get('https://login.binck.nl/klanten/Login.aspx?ReturnUrl=%2fklanten%2fdefault.aspx'); $mech->eval(q{document.getElementById('ctl00_Content_Gebruikersnaam').value='username';document.getElementById('ctl00_Content_Wachtwoord').value='password'; window.open(document.getElementById('ctl00_Content_LoginButton').href, '_self', 'true');});