use WWW::Mechanize::Chrome; Log::Log4perl->easy_init($ERROR); # Set priority of root logger to ERROR my $mech = WWW::Mechanize::Chrome->new(); $mech->get('http://10.86.11.200:8090/'); $mech->form_number(1); $mech->field('#username', 'admin'); $mech->field('#password', '*******'); $mech->click_button(id => 'loginBtn'); sleep 10;