Skip to content

Commit

Permalink
Remove :visible hack, allow visible => 1 hack
Browse files Browse the repository at this point in the history
  • Loading branch information
JRaspass committed Jan 2, 2018
1 parent 7988cc2 commit 77b66f6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/WebDriver/Tiny.pm
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ sub find {

my $method = $methods->{ $args{method} // '' } // 'css selector';

my $must_be_visible
= $method eq 'css selector' && $selector =~ s/:visible$//;

# FIXME
my $drv = ref $self eq 'WebDriver::Tiny::Elements' ? $self->[0] : $self;

Expand All @@ -200,7 +197,7 @@ sub find {

@ids = grep {
$drv->_req( GET => "/element/$_/displayed" )
} @ids if $must_be_visible;
} @ids if $args{visible};

last if @ids;

Expand Down

0 comments on commit 77b66f6

Please sign in to comment.