I am trying to use a perl script to automate interactions with a website.
I use the WWW :: Mechanize module to implement my design. But I cannot execute a button click in my perl script using the command as shown below.
$mech->click( $button [, $x, $y] ) $mech->click_button( ... )
This is because this button does not belong to any form and without a name, I cannot call or find this button in my perl script. How can I do this by clicking this button in my perl script, how do I interact with the browser? Thanks.
<button class="button transactional" id="checkout-now"><span>Check Out Now</span></button>
source share