mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Fix deprecation warning in selenium driver.
As of selenium-webdriver 0.2.0: "Selenium::WebDriver::Element#value is deprecated, please use Selenium::WebDriver::Element#attribute('value')"
This commit is contained in:
parent
65ba487d22
commit
f02754183b
1 changed files with 2 additions and 2 deletions
|
@ -15,9 +15,9 @@ class Capybara::Selenium::Node < Capybara::Driver::Node
|
|||
|
||||
def value
|
||||
if tag_name == "select" and self[:multiple] and not self[:multiple] == "false"
|
||||
native.find_elements(:xpath, ".//option").select { |n| n.selected? }.map { |n| n.value || n.text }
|
||||
native.find_elements(:xpath, ".//option").select { |n| n.selected? }.map { |n| n.attribute('value') || n.text }
|
||||
else
|
||||
native.value
|
||||
native.attribute('value')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue