consider head and script tags invisible
This commit is contained in:
parent
6337a1cc12
commit
6a70d6fc54
|
@ -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
|
||||
|
||||
##
|
||||
|
|
Loading…
Reference in New Issue