mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Selenium prefers value over text for multiple select options
This commit is contained in:
parent
7322537335
commit
b646c8b4a1
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Capybara::Driver::Selenium < Capybara::Driver::Base
|
|||
|
||||
def value
|
||||
if tag_name == "select" and self[:multiple]
|
||||
native.find_elements(:xpath, ".//option").select { |n| n.selected? }.map { |n| n.text }
|
||||
native.find_elements(:xpath, ".//option").select { |n| n.selected? }.map { |n| n.value || n.text }
|
||||
else
|
||||
self[:value]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue