in reply to help clicking radio buttons using WWW::Mechanize::Chrome
I can't reproduce the problem. I'm using WWW::Mechanize::Chrome v0.65, Chromium v87, and the following program:
#!/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);
This program runs through to Done, waits 5 seconds and then finished. It seems to me all elements on the website get selected.
Maybe you are using an older version of WWW::Mechanize::Chrome?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help clicking radio buttons using WWW::Mechanize::Chrome
by Special_K (Pilgrim) on Jan 13, 2021 at 18:13 UTC | |
by Corion (Patriarch) on Jan 13, 2021 at 20:01 UTC | |
by Special_K (Pilgrim) on Jan 15, 2021 at 18:30 UTC | |
by Corion (Patriarch) on Jan 15, 2021 at 22:32 UTC |