Sha256: daeee0dc595458f3af45a2418a68c297f8c26a4f3c0923a873f771af8540350a

Contents?: true

Size: 402 Bytes

Versions: 9

Compression:

Stored size: 402 Bytes

Contents

# encoding: utf-8
module Watir
  class Radio < Input
    identifier :type => 'radio'

    container_method  :radio
    collection_method :radios

    #
    # Select this radio button.
    #

    def set
      assert_exists
      assert_enabled

      @element.click unless set?
    end

    #
    # Is this radio set?
    #

    def set?
      assert_exists
      @element.selected?
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
watir-webdriver-0.0.6 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.5 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.4 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.3 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.2 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.1 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.1.dev7 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.1.dev6 lib/watir-webdriver/elements/radio.rb
watir-webdriver-0.0.1.dev5 lib/watir-webdriver/elements/radio.rb