I need to run an automated process accessing WebGL inside an iFrame - headless, and after a login.
Up until now I've attempted to do this in different ways:
The latter is run like this:
my $mech = WWW::Mechanize::Chrome->new(
headless => 0,
launch_exe => '/usr/bin/xvfb-run -a --server-args="-screen 0 1280x800x24 -ac -nolisten tcp -dpi 96 +extension RANDR" /usr/bin/google-chrome',
launch_arg => ["--headless" , "--no-sandbox"],
);
Is there something I haven't tried that could work? I am using perl - but might grudgingly try Python if there's a chance it will work.
xvfb-run
must be prepended to the perl script like this
/usr/bin/xvfb-run -a --server-args="-screen 0 1280x800x24 \
-ac -nolisten tcp -dpi 96 +extension RANDR" \
perl chrome_script.pl
so it wraps the script, and the chrome instance inside it.
See the manual for xvfb-run