Class: Arachni::BrowserCluster::Jobs::ResourceExploration::EventTrigger
- Inherits:
-
Arachni::BrowserCluster::Jobs::ResourceExploration
- Object
- Arachni::BrowserCluster::Job
- Arachni::BrowserCluster::Jobs::ResourceExploration
- Arachni::BrowserCluster::Jobs::ResourceExploration::EventTrigger
- Defined in:
- lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb,
lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger/result.rb
Overview
Direct Known Subclasses
Defined Under Namespace
Classes: Result
Instance Attribute Summary collapse
- #element ⇒ Browser::ElementLocator
-
#event ⇒ Symbol
Event to trigger on the given element.
Attributes inherited from Arachni::BrowserCluster::Jobs::ResourceExploration
Attributes inherited from Arachni::BrowserCluster::Job
Instance Method Summary collapse
Methods inherited from Arachni::BrowserCluster::Jobs::ResourceExploration
#clean_copy, #dup, #initialize
Methods inherited from Arachni::BrowserCluster::Job
#==, #clean_copy, #configure_and_run, #dup, #forward, #forward_as, #hash, #id, #initialize, #never_ending=, #never_ending?, #save_result
Constructor Details
This class inherits a constructor from Arachni::BrowserCluster::Jobs::ResourceExploration
Instance Attribute Details
#element ⇒ Browser::ElementLocator
27 28 29 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb', line 27 def element @element end |
#event ⇒ Symbol
Returns Event to trigger on the given element.
24 25 26 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb', line 24 def event @event end |
Instance Method Details
#run ⇒ Object
Loads a Arachni::BrowserCluster::Jobs::ResourceExploration#resource and triggers the specified #event on the given element.
31 32 33 34 35 36 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb', line 31 def run browser.on_new_page { |page| save_result( page: page ) } browser.load resource browser.trigger_event( resource, element, event ) end |
#to_s ⇒ Object
38 39 40 41 |
# File 'lib/arachni/browser_cluster/jobs/resource_exploration/event_trigger.rb', line 38 def to_s "#<#{self.class}:#{object_id} @resource=#{@resource} " + "@event=#{@event.inspect} @element=#{@element.inspect}>" end |