Created
February 8, 2019 17:39
-
-
Save dklawren/bc926546f4c9fb129876ee89e9dc13bd to your computer and use it in GitHub Desktop.
Bugzilla::Test::Selenium::Remote::Driver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# | |
# This Source Code Form is "Incompatible With Secondary Licenses", as | |
# defined by the Mozilla Public License, v. 2.0. | |
package Bugzilla::Test::Selenium::Remote::Driver; | |
use 5.10.1; | |
use Moo; | |
use Test::More; | |
extends qw(Test::Selenium::Remote::Driver); | |
sub open_ok { | |
my ($self, $url) = @_; | |
return $self->get_ok($url); | |
} | |
sub type_ok { | |
my ($self, $id, $text) = @_; | |
my $el | |
= $self->find_element(qq{//*[\@id="$id"]}, 'xpath'); | |
$el->send_keys_ok($text); | |
} | |
sub wait_for_page_to_load_ok { | |
my ($self, $timeout) = @_; | |
ok($self->set_timeout('page load', $timeout)); | |
} | |
sub wait_for_page_to_load { | |
my ($self, $timeout) = @_; | |
$self->set_timeout('page load', $timeout); | |
} | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment