Sha256: b4910c99ebbd309fec37e8f277c1c43dd0b179a99ac0445a5481c2d02076dd56

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

# encoding: utf-8
module Watir
  class Radio < Input
    include SharedRadioCheckbox

    identifier :type => 'radio' # a text field is the default for input elements, so this needs to be changed

    container_method  :radio
    collection_method :radios

    def set(bool = true)
      assert_exists
      assert_enabled

      if set?
        @element.click unless bool
      else
        @element.click if bool
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-webdriver-0.0.1.dev lib/watir-webdriver/elements/radio.rb