module Briar::TextField
Public Instance Methods
should_not_see_text_field(name)
click to toggle source
# File lib/briar/text_field.rb, line 16 def should_not_see_text_field (name) res = text_field_exists? name if res screenshot_and_raise "i should not see text field with name #{name}" end end
should_see_text_field(name)
click to toggle source
# File lib/briar/text_field.rb, line 9 def should_see_text_field (name) res = text_field_exists? name unless res screenshot_and_raise "could not find text field with name #{name}" end end
should_see_text_field_with_text(text_field, text)
click to toggle source
# File lib/briar/text_field.rb, line 56 def should_see_text_field_with_text (text_field, text) unless text_field_exists_with_text? text_field, text actual = query("textField marked:'#{text_field}'", :text).first screenshot_and_raise "i expected to see text field named '#{text_field}' with text '#{text}' but found '#{actual}'" end end
text_field_exists?(name)
click to toggle source
# File lib/briar/text_field.rb, line 5 def text_field_exists? (name) !query("textField marked:'#{name}'").empty? end
text_field_exists_with_text?(text_field, text)
click to toggle source
# File lib/briar/text_field.rb, line 51 def text_field_exists_with_text?(text_field, text) actual = query("textField marked:'#{text_field}'", :text).first actual.eql? text end