Sha256: 7b26e7272c2b4f8a02958954ab46f8f9d319062927cc5f1ec90573fba81816ea

Contents?: true

Size: 358 Bytes

Versions: 8

Compression:

Stored size: 358 Bytes

Contents

class TestHarness
  class FormStruct
    attr_accessor :browser

    def initialize(browser)
      self.browser = browser
    end

    def method_missing(name, *args, &block)
      id = name.to_s.chomp('=')
      value = args[0]
      field = browser.find_field(id)
      field[:type] =~ /^select/ ? field.select(value) : field.set(value)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
test-harness-0.6.3 lib/form_struct.rb
test-harness-0.6.2 lib/form_struct.rb
test-harness-0.6.1 lib/form_struct.rb
test-harness-0.6.0 lib/form_struct.rb
test-harness-0.4.14 lib/form_struct.rb
test-harness-0.4.13 lib/form_struct.rb
test-harness-0.4.12 lib/form_struct.rb
test-harness-0.4.11 lib/form_struct.rb