Rand Stats

Selenium::WebDriver

github:azawawi

Selenium::WebDriver

Actions
Status

This module provides the Raku bindings for the Selenium WebDriver Wire Protocol.

Note: This module is a work in progress. Please see its project status here.

Example

use v6;
use Selenium::WebDriver::PhantomJS;

my $driver = Selenium::WebDriver::PhantomJS.new;
$driver.url("http://google.com");
say "Title: "         ~ $driver.title;
say "URL: "           ~ $driver.url;
say "Source length: " ~ $driver.source.chars;
$driver.save-screenshot('test.png');
LEAVE {
  $driver.quit if $driver.defined
};

For more examples, please see the examples folder.

PhantomJS Installation

Linux/Debian

To install phantomjs on Debian, please type the following:

$ sudo apt-get install phantomjs

CAUTION: Also there are prebuilt binaries for PhantomJS for Linux if the packaged version is a bit old.

Mac OS X

To install PhantomJS on Mac OS X, the simplest solution is to use brew:

$ brew update
$ brew install phantomjs

Windows

To install PhantomJS on windows, please download a copy from Here and then make it available in your PATH environment variable.

Travis CI

Travis CI comes with pre-installed PhantomJS. No special instructions are needed.

Project Status

Web DriverStatus
PhantomJSDONE but needs more tests
FirefoxDONE
ChromeDONE but needs external chromedriver
SafariPending
OperaPending
MSIEPending
MSEdgePending
BlackBerryDONE

Installation

To install it using zef (a module management tool bundled with Rakudo Star):

$ zef install Selenium::WebDriver

Testing

$ prove --ext .rakutest -ve "raku -I."
$ zef install Test::META
$ TEST_AUTHOR=1 prove --ext .rakutest -ve "raku -I."

Author

Ahmad M. Zawawi, azawawi on #raku

License

MIT License