remove commented code
This commit is contained in:
parent
f6b2f3adf0
commit
3b0eec9fb7
|
@ -105,7 +105,6 @@ module Capybara
|
|||
|
||||
if check_ancestors
|
||||
!find_xpath(VISIBILITY_XPATH)
|
||||
# !find_xpath("boolean(./ancestor-or-self::*[contains(@style, 'display:none') or contains(@style, 'display: none') or @hidden or name()='script' or name()='head'])")
|
||||
else
|
||||
# No need for an xpath if only checking the current element
|
||||
!(native.key?('hidden') || (native[:style] =~ /display:\s?none/) || %w[script head].include?(tag_name))
|
||||
|
|
|
@ -97,10 +97,8 @@ class Capybara::RackTest::Node < Capybara::Driver::Node
|
|||
|
||||
if %w[option optgroup].include? tag_name
|
||||
find_xpath(OPTION_OWNER_XPATH)[0].disabled?
|
||||
# find_xpath('parent::*[self::optgroup or self::select or self::datalist]')[0].disabled?
|
||||
else
|
||||
!find_xpath(DISABLED_BY_FIELDSET_XPATH).empty?
|
||||
# !find_xpath('parent::fieldset[@disabled] | ancestor::*[not(self::legend) or preceding-sibling::legend][parent::fieldset[@disabled]]').empty?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@ class Capybara::Selenium::MarionetteNode < Capybara::Selenium::Node
|
|||
find_xpath('parent::*[self::optgroup or self::select]')[0].disabled?
|
||||
else
|
||||
!find_xpath(DISABLED_BY_FIELDSET_XPATH).empty?
|
||||
# !find_xpath('parent::fieldset[@disabled] | ancestor::*[not(self::legend) or preceding-sibling::legend][parent::fieldset[@disabled]]').empty?
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue