STOP THE PRESSES! IT WORKED:
From the shell, I failed to start chromium with --remote-debugging-port=9222
So I guess, in a script, I can spawn chromium headless, then run the per script and attach to it! It just might work! THANKS!
---------------------------------------
OK, my code is now:I start the browser manually and load https://grocery.walmart.com/ordersuse Log::Log4perl qw(:easy); use WWW::Mechanize::Chrome; Log::Log4perl->easy_init($ERROR); my $mech = WWW::Mechanize::Chrome->new( headless => 0, # start_url => 'https://grocery.walmart.com/orders', data_directory => '/home/rwk/chrome-session-for-walmart', incognito => 0, launch_exe => '/usr/bin/chromium', javascript => 1, launch_arg => [ "--remote-debugging-port=9222" ], tab => qr/Walmart Grocery/, ); my $txt = $mech->content; open($f, '>', '/tmp/out.html'); print $f $txt; close $f;
It correctly logs in and display my order page.
The page Title shows "Walmart Grocery".
I run my script above and get:
Please advise...error when connectingInternal Exception at /usr/local/lib64/perl5/5.30 +.1/WWW/Mechanize/Chrome.pm line 993.
In reply to Re^2: WWW:Mechanize::Chrome incognito
by tunerooster
in thread WWW:Mechanize::Chrome incognito
by tunerooster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |