Don't roundtrip through Selenium twice to determine visibility

This commit is contained in:
John Firebaugh 2010-12-22 16:42:38 -08:00
parent a2b1b3315e
commit af9dd36704
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ class Capybara::Driver::Selenium < Capybara::Driver::Base
end
def visible?
native.displayed? and native.displayed? != "false"
displayed = native.displayed?
displayed and displayed != "false"
end
def find(locator)