Weasel::Driver::Selenium2 - Weasel driver wrapping Selenium::Remote::Driver
0.11
use Weasel; use Weasel::Session; use Weasel::Driver::Selenium2; my %opts = ( wait_timeout => 3000, # 3000 msec == 3s window_size => '1024x1280', caps => { port => 4444, # ... and other Selenium::Remote::Driver capabilities options }, ); my $weasel = Weasel->new( default_session => 'default', sessions => { default => Weasel::Session->new( driver => Weasel::Driver::Selenium2->new(%opts), ), }); $weasel->session->get('http://localhost/index');
This module implements the Weasel::DriverRole protocol, wrapping Selenium::Remote::Driver.
This module wraps Selenium::Remote::Driver, version 2.
Internal. Holds the reference to the Selenium::Remote::Driver instance.
Selenium::Remote::Driver
The number of miliseconds to wait before failing to find a tag or completing a wait condition, turns into an error.
Change by calling set_wait_timeout.
set_wait_timeout
String holding '<height>x<width>', the window size to be used. E.g., to set the window size to 1280(wide) by 1024(high), set to: '1024x1280'.
Change by calling set_window_size.
set_window_size
Capabilities to be passed to the Selenium::Remote::Driver constructor when start is being called. Changes won't take effect until the session is stopped and started or restarted.
start
For the documentation of the methods in this section, see Weasel::DriverRole.
A few capabilities can be specified in t/.pherkin.yaml Some can even be specified as environment variables, they will be expanded here if present.
This module implements the following methods in addition to the Weasel::DriverRole protocol methods:
Sets the wait_timeut attribute of the object as well as of the Selenium::Remote::Driver object, if a session has been started.
wait_timeut
Sets the window_size attribute of the object as well as the window size of the currently active window of the Selenium::Remote::Driver object, if a session has been started.
window_size
Erik Huelsmann
Bugs can be filed in the GitHub issue tracker for the Weasel project: https://github.com/perl-weasel/weasel-driver-selenium2/issues
The source code repository for Weasel is at https://github.com/perl-weasel/weasel-driver-selenium2
Community support is available through perl-weasel@googlegroups.com.
(C) 2016-2020 Erik Huelsmann
Licensed under the same terms as Perl.
To install Weasel::Driver::Selenium2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Weasel::Driver::Selenium2
CPAN shell
perl -MCPAN -e shell install Weasel::Driver::Selenium2
For more information on module installation, please visit the detailed CPAN module installation guide.