Skip to content

Commit acbdb9d

Browse files
committed
patch out test broken by #426
1 parent 4e52f68 commit acbdb9d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

t/02-webelement.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use strict;
22
use warnings;
33

44
use Test::More;
5+
use Test::MockModule;
56
use Selenium::Remote::Driver;
67
use Selenium::Remote::Mock::RemoteConnection;
78

@@ -46,11 +47,16 @@ INPUT: {
4647
ok(!$ret, 'Get attribute returns false for a missing attribute.');
4748
$ret = $elem->get_tag_name();
4849
is($ret, 'input', 'Get tag name');
50+
my $selfmock = Test::MockModule->new('Selenium::Remote::WebElement');
51+
$selfmock->redefine('get_tag_name',sub { 'input' });
52+
$selfmock->redefine('get_property',sub { 0 });
4953

5054
$elem = $driver->find_element('checky', 'id');
5155
$ret = $elem->is_selected();
5256
is($ret, 0, 'Checkbox not selected');
5357
$ret = $elem->click();
58+
$selfmock->redefine('get_property',sub { 1 });
59+
5460
$ret = $elem->is_selected();
5561
is($ret, 1, 'Checkbox is selected');
5662
TODO: {

0 commit comments

Comments
 (0)