mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Fix workaround for safari disabled node issues
This commit is contained in:
parent
533c6eb3c4
commit
6126b358c4
1 changed files with 3 additions and 1 deletions
|
@ -40,10 +40,12 @@ class Capybara::Selenium::SafariNode < Capybara::Selenium::Node
|
|||
end
|
||||
|
||||
def disabled?
|
||||
return true if super || (self[:disabled] == 'true')
|
||||
return true if super
|
||||
|
||||
# workaround for safaridriver reporting elements as enabled when they are nested in disabling elements
|
||||
if %w[option optgroup].include? tag_name
|
||||
return true if self[:disabled] == 'true'
|
||||
|
||||
find_xpath('parent::*[self::optgroup or self::select]')[0].disabled?
|
||||
else
|
||||
!find_xpath(DISABLED_BY_FIELDSET_XPATH).empty?
|
||||
|
|
Loading…
Add table
Reference in a new issue