Method: Selenium::WebDriver::Support::Select#initialize
- Defined in:
- lib/selenium/webdriver/support/select.rb
#initialize(element) ⇒ Select
Returns a new instance of Select.
28 29 30 31 32 33 34 35 |
# File 'lib/selenium/webdriver/support/select.rb', line 28 def initialize(element) tag_name = element.tag_name raise ArgumentError, "unexpected tag name #{tag_name.inspect}" unless tag_name.casecmp('select').zero? @element = element @multi = ![nil, 'false'].include?(element.dom_attribute(:multiple)) end |