diff --git a/lib/WebDriver/Tiny.pm b/lib/WebDriver/Tiny.pm index 49f5b58..c2254cc 100644 --- a/lib/WebDriver/Tiny.pm +++ b/lib/WebDriver/Tiny.pm @@ -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; @@ -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;