in reply to Re^2: LWP hit button to continue
in thread LWP hit button to continue
It's actually not that hard. I missed in your example HTML that the button is just "decoration" for the a element (which is missing a closing quote after https://something), so you don't need to "click" a button, you need to follow a link.
Note that $url should be provided by someone.
use WWW::Mechanize; $ua = WWW::Mechanize->new; my $response = $ua->get($url); my $next_response = $ua->follow_link(text_regex => qr/continue.../);
I missed in your example that the button is just "decoration" for the a element (which is missing a closing quote after https://something), so you don't need to "click" a button, you need to follow a link.
|
|---|