Sha256: 2110f51925a5c1032896b95c2901c2b4561fe285815f583a6530459f6dec1f21

Contents?: true

Size: 885 Bytes

Versions: 10

Compression:

Stored size: 885 Bytes

Contents

module Cello
  module PageObjects
    module TextfieldHelper
      def define_extras_for_text_field(name)
        define_method "#{name}_clear" do
          send(name).clear
        end
        define_method "#{name}_get_text" do
          send(name).value
        end
        define_method "#{name}_fill_with" do |text|
          send(name).set text
        end
        define_method "#{name}_dont_contain" do |text|
          !(send(name).value.include? text)
        end
        define_method "#{name}_contains" do |text|
          send(name).value.include? text
        end
        define_method "#{name}_text_is" do |text|
          send(name).value == text
        end
        define_method "#{name}_is_empty?" do 
          send(name).value.empty?
        end
        define_method "#{name}_text_size" do 
          send(name).value.size
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cello-0.0.32 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.31 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.30 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.29 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.28 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.27 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.26 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.25 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.23 lib/cello/pageobjects/html_elements/textfield_helper.rb
cello-0.0.21 lib/cello/pageobjects/html_elements/textfield_helper.rb