Sha256: 687001de1634a3e81f124f93020b8be7b13788b63ebcb0f3b3192afb3803ddef

Contents?: true

Size: 678 Bytes

Versions: 9

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

require 'selenium-webdriver'

module Aranha
  module Selenium
    class Session < ::SimpleDelegator
      module Select
        def select_option(field, value, *find_element_args)
          select = find_element(*find_element_args)
          option = ::Selenium::WebDriver::Support::Select.new(select)
          option.select_by(field, value)
        end

        def select_option_by_text(text, *find_element_args)
          select_option(:text, text, *find_element_args)
        end

        def select_option_by_value(value, *find_element_args)
          select_option(:value, value, *find_element_args)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aranha-selenium-0.11.1 lib/aranha/selenium/session/select.rb
aranha-selenium-0.11.0 lib/aranha/selenium/session/select.rb
aranha-selenium-0.10.1 lib/aranha/selenium/session/select.rb
aranha-selenium-0.10.0 lib/aranha/selenium/session/select.rb
aranha-selenium-0.9.0 lib/aranha/selenium/session/select.rb
aranha-selenium-0.8.0 lib/aranha/selenium/session/select.rb
aranha-selenium-0.7.1 lib/aranha/selenium/session/select.rb
aranha-selenium-0.7.0 lib/aranha/selenium/session/select.rb
aranha-selenium-0.6.1 lib/aranha/selenium/session/select.rb