Sha256: 2c70081e9f078c9749054ce544822192972936575e9cdf11f20332807bf677d4
Contents?: true
Size: 1.28 KB
Versions: 2
Compression:
Stored size: 1.28 KB
Contents
=begin Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.com> This file is part of the Arachni Framework project and is subject to redistribution and commercial restrictions. Please see the Arachni Framework web site for more information on licensing and terms of use. =end module Arachni::Element class Form # Extends {Arachni::Element::Capabilities::Auditable::DOM} with {Form}-specific # functionality. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class DOM < Base include Arachni::Element::Capabilities::WithNode include Arachni::Element::Capabilities::Auditable::DOM 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 # Submits the form using the configured {#inputs}. def trigger browser.fire_event element, :submit, inputs: inputs.dup end def valid_input_name?( name ) @valid_input_names.include? name.to_s end def type self.class.type end def self.type :form_dom end def initialization_options super.merge( inputs: inputs.dup ) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
arachni-1.2.1 | lib/arachni/element/form/dom.rb |
arachni-1.2 | lib/arachni/element/form/dom.rb |