Explorar o código

Add convenience module for PhantomJS

vagrant %!s(int64=11) %!d(string=hai) anos
pai
achega
71ae3b22bf
Modificáronse 2 ficheiros con 13 adicións e 1 borrados
  1. 11 0
      lib/Selenium/PhantomJS.pm
  2. 2 1
      t/convenience.t

+ 11 - 0
lib/Selenium/PhantomJS.pm

@@ -0,0 +1,11 @@
+package Selenium::PhantomJS;
+
+use Moo;
+extends 'Selenium::Remote::Driver';
+
+has '+browser_name' => (
+    is => 'ro',
+    default => sub { 'phantomjs' }
+);
+
+1;

+ 2 - 1
t/convenience.t

@@ -2,9 +2,10 @@
 
 use strict;
 use warnings;
-use Selenium::InternetExplorer;
 use Selenium::Chrome;
 use Selenium::Firefox;
+use Selenium::InternetExplorer;
+use Selenium::PhantomJS;
 use Test::More;
 
 use FindBin;