#!/usr/bin/perl -w use strict; use 5.012; use Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; my $url = "https://www.tenthousand.cc/products/interval-short"; Log::Log4perl->easy_init($ERROR); my $mech = WWW::Mechanize::Chrome->new( #headless => 0, # headless => 1, # launch_exe => 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' ); my $post_response; $post_response = $mech->get($url); $post_response->is_success || die $post_response->status_line; $mech->sleep(5); # step 1 - select color say "Color"; $mech->click({id => 'ProductSelect-option-color-solar-8568844557'}); # step 2 - select size say "Size"; $mech->click({id => 'ProductSelect-option-size-medium-8568844557'}); # step 3 - select inseam say "Inseam"; $mech->click({id => 'ProductSelect-option-inseam-9-inch-8568844557'}); # step 4 - select liner/no liner say "Liner"; $mech->click({id => 'ProductSelect-option-liner-no-8568844557'}); say "Done"; $mech->sleep(5);