in reply to Re: WWW:Mechanize::Chrome incognito
in thread WWW:Mechanize::Chrome incognito

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:
use 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;
I start the browser manually and load https://grocery.walmart.com/orders

It correctly logs in and display my order page.

The page Title shows "Walmart Grocery".

I run my script above and get:

error when connectingInternal Exception at /usr/local/lib64/perl5/5.30 +.1/WWW/Mechanize/Chrome.pm line 993.
Please advise...