in reply to Re: WWW::Mechanize::Firefox could not find submit button
in thread WWW::Mechanize::Firefox could not click submit button

I can't replicate the problem with WWW::Mechanize::Firefox 0.66. Maybe you are on an older version?

To see what XPath expression is generated and passed on to Firefox, you can turn up the log level:

my $mech = WWW::Mechanize::Firefox->new( autoclose => 0, autodie => 1, log => ['debug'], );

That will produce lots and lots of output, and somewhere in there you might find the error message, and somewhere before that the invalid XPath expression that causes it. But before doing so, consider upgrading to the latest versions.