class Wrapybara::Form
Public Class Methods
new(identifier, scope = default_scope, how = default_how)
click to toggle source
# File lib/wrapybara/elements/form.rb, line 5 def initialize(identifier, scope = default_scope, how = default_how) @identifier = identifier @how = how @scope = scope xpath = "id('#{identifier}') | id(//label[contains(normalize-space(string(.)), '#{identifier}')]/@for)" @element = get_element(xpath, scope) end
Public Instance Methods
should_exist()
click to toggle source
Calls superclass method
Wrapybara::Element#should_exist
# File lib/wrapybara/elements/form.rb, line 13 def should_exist super "Expected a form #{self.element_identifier} to exist" end
should_not_exist()
click to toggle source
Calls superclass method
Wrapybara::Element#should_not_exist
# File lib/wrapybara/elements/form.rb, line 17 def should_not_exist super "Did not expect a form #{self.element_identifier}' to exist" end