WWW-Mechanize-Chrome
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
`<$ENV{WWW_MECHANIZE_CHROME_ARGS}`>
variable and prepended to the `launch_arg` array.
- **separate\_session**
separate_session => 1 # create a new, empty session
This creates an empty, fresh Chrome session without any cookies. Setting this
will disregard any **data\_directory** setting.
- **incognito**
incognito => 1 # open the browser in incognito mode
Defaults to false. Set to true to launch the browser in incognito mode.
Most likely, you want to use **separate\_session** instead.
- **data\_directory**
data_directory => '/path/to/data/directory' # set the data directory
By default, an empty data directory is used. Use this setting to change the
base data directory for the browsing session.
lib/WWW/Mechanize/Chrome.pm view on Meta::CPAN
variable and prepended to the C<launch_arg> array.
=item B<separate_session>
separate_session => 1 # create a new, empty session
This creates an empty, fresh Chrome session without any cookies. Setting this
will disregard any B<data_directory> setting.
=item B<incognito>
incognito => 1 # open the browser in incognito mode
Defaults to false. Set to true to launch the browser in incognito mode.
Most likely, you want to use B<separate_session> instead.
=item B<data_directory>
data_directory => '/path/to/data/directory' # set the data directory
By default, an empty data directory is used. Use this setting to change the
base data directory for the browsing session.
lib/WWW/Mechanize/Chrome.pm view on Meta::CPAN
push @{ $options->{ launch_arg }}, "--remote-debugging-port=$options->{ port }";
push @{ $options->{ launch_arg }}, "--remote-allow-origins=*";
};
if ($options->{listen_host} || $options->{host} ) {
my $host = $options->{listen_host} || $options->{host};
push @{ $options->{ launch_arg }}, "--remote-debugging-address=$host";
};
};
if ($options->{incognito}) {
push @{ $options->{ launch_arg }}, "--incognito";
};
if ($options->{data_directory}) {
push @{ $options->{ launch_arg }}, "--user-data-dir=$options->{ data_directory }";
};
if (my $profile = $options->{profile}) {
if(! $options->{data_directory}) {
croak "Cannot use the 'profile' option without also having 'data_directory'";
} elsif( $profile =~ m![/\\]! ) {
( run in 1.155 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )