|
@@ -20,8 +20,6 @@ use Scalar::Util;
|
|
|
use Selenium::Remote::RemoteConnection;
|
|
use Selenium::Remote::RemoteConnection;
|
|
|
use Selenium::Remote::Commands;
|
|
use Selenium::Remote::Commands;
|
|
|
use Selenium::Remote::WebElement;
|
|
use Selenium::Remote::WebElement;
|
|
|
-use Selenium::Remote::MockRemoteConnection;
|
|
|
|
|
-use Selenium::Remote::MockCommands;
|
|
|
|
|
|
|
|
|
|
use constant FINDERS => {
|
|
use constant FINDERS => {
|
|
|
class => 'class name',
|
|
class => 'class name',
|
|
@@ -314,28 +312,15 @@ has 'session_id' => (
|
|
|
has 'remote_conn' => (
|
|
has 'remote_conn' => (
|
|
|
is => 'lazy',
|
|
is => 'lazy',
|
|
|
builder => sub {
|
|
builder => sub {
|
|
|
- my $self = shift;
|
|
|
|
|
- if ( $self->testing ) {
|
|
|
|
|
- return Selenium::Remote::MockRemoteConnection->new(
|
|
|
|
|
- spec => $self->spec,
|
|
|
|
|
- mock_cmds => $self->commands,
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
|
|
+ my $self = shift;
|
|
|
return Selenium::Remote::RemoteConnection->new(
|
|
return Selenium::Remote::RemoteConnection->new(
|
|
|
remote_server_addr => $self->remote_server_addr,
|
|
remote_server_addr => $self->remote_server_addr,
|
|
|
port => $self->port,
|
|
port => $self->port,
|
|
|
ua => $self->ua
|
|
ua => $self->ua
|
|
|
);
|
|
);
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
-has 'spec' => (
|
|
|
|
|
- is => 'ro',
|
|
|
|
|
- default => sub { {}} ,
|
|
|
|
|
-);
|
|
|
|
|
-
|
|
|
|
|
has 'ua' => (
|
|
has 'ua' => (
|
|
|
is => 'lazy',
|
|
is => 'lazy',
|
|
|
builder => sub { return LWP::UserAgent->new }
|
|
builder => sub { return LWP::UserAgent->new }
|
|
@@ -344,13 +329,7 @@ has 'ua' => (
|
|
|
has 'commands' => (
|
|
has 'commands' => (
|
|
|
is => 'lazy',
|
|
is => 'lazy',
|
|
|
builder => sub {
|
|
builder => sub {
|
|
|
- my $self = shift;
|
|
|
|
|
- if ( $self->testing ) {
|
|
|
|
|
- return Selenium::Remote::MockCommands->new;
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- return Selenium::Remote::Commands->new;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return Selenium::Remote::Commands->new;
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
|
|
|