class Arachni::Element::Form::DOM
Extends {Arachni::Element::Capabilities::Auditable::DOM} with {Form}-specific functionality.
@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>
Public Class Methods
new( options )
click to toggle source
Calls superclass method
Arachni::Element::DOM::new
# File lib/arachni/element/form/dom.rb, line 27 def initialize( options ) super inputs = (options[:inputs] || self.parent.inputs).dup @valid_input_names = inputs.keys.map(&:to_s) self.inputs = inputs @default_inputs = self.inputs.dup.freeze end
type()
click to toggle source
# File lib/arachni/element/form/dom.rb, line 49 def self.type :form_dom end
Public Instance Methods
initialization_options()
click to toggle source
Calls superclass method
Arachni::Element::DOM#initialization_options
# File lib/arachni/element/form/dom.rb, line 53 def initialization_options super.merge( inputs: inputs.dup ) end
trigger()
click to toggle source
Submits the form using the configured {#inputs}.
# File lib/arachni/element/form/dom.rb, line 38 def trigger [ browser.fire_event( locate, :submit, inputs: inputs.dup ) ] end
type()
click to toggle source
# File lib/arachni/element/form/dom.rb, line 46 def type self.class.type end
valid_input_name?( name )
click to toggle source
# File lib/arachni/element/form/dom.rb, line 42 def valid_input_name?( name ) @valid_input_names.include? name.to_s end