consider head and script tags invisible

This commit is contained in:
Mark Dodwell 2011-10-23 22:51:03 -07:00
parent 6337a1cc12
commit 6a70d6fc54
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ module Capybara
# @return [Boolean] Whether the element is visible
#
def visible?
native.xpath("./ancestor-or-self::*[contains(@style, 'display:none') or contains(@style, 'display: none')]").size == 0
native.xpath("./ancestor-or-self::*[contains(@style, 'display:none') or contains(@style, 'display: none') or name()='script' or name()='head']").size == 0
end
##