... my $response = $mech->get($url); $mech->sleep(3); # Click in Login Email form field $mech->click({ xpath => '//*[@id="Email"]' }); $mech->field( Email => 'email-address@gmail.com' ); $mech->sleep(1); $mech->click_button( name => 'signIn' ); # Give time for password page to load $mech->sleep(5); # Click in Password field $mech->click({ xpath => '//*[@id="Passwd"]' }); $mech->sleep(3); # Enter Password $mech->field( "Passwd" => 'password-for-account' ); $mech->sleep(1); $logger->info("Clicking Sign in button"); $mech->click_button( name => 'signIn' ); ...