Sha256: 46f744f082af6708983983bd9811d5b0b9cc81252a4b6e4b04c1b1dfe1092311
Contents?: true
Size: 541 Bytes
Versions: 8
Compression:
Stored size: 541 Bytes
Contents
class FillIN::Input attr_reader :label, :value def initialize(label, value, within) @label = label @value = value @within = within || Capybara.current_session end def call case input.native.attribute("type") when "radio", "checkbox" Pickles.select_input(input, @value) when "file" Pickles.attach_file(input, @value) else # password email tel ... input.set(@value) end input end private def input @input ||= Pickles.find_input(@label, within: @within) end end
Version data entries
8 entries across 8 versions & 1 rubygems