Sha256: 01798aec677938cc762524f062dde220d373dcc91b127058d0a7a2a05aba7de8

Contents?: true

Size: 648 Bytes

Versions: 2

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

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

2 entries across 2 versions & 1 rubygems

Version Path
aranha-selenium-0.6.0 lib/aranha/selenium/session/select.rb
aranha-selenium-0.5.0 lib/aranha/selenium/session/select.rb