Class: Sapphire::Plugins::FirebugPlugin

Inherits:
Plugin show all
Defined in:
lib/sapphire/Plugins/FireBug/FirebugPlugin.rb

Instance Attribute Summary

Attributes inherited from Plugin

#method, #object

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Plugin

observe, #observes

Constructor Details

#initializeFirebugPlugin

Returns a new instance of FirebugPlugin.



6
7
8
9
10
11
# File 'lib/sapphire/Plugins/FireBug/FirebugPlugin.rb', line 6

def initialize

  observes :class => WebAbstractions::FireFoxBrowser,
           :method => :Create

end

Class Method Details

.IsObserverObject



30
31
32
# File 'lib/sapphire/Plugins/FireBug/FirebugPlugin.rb', line 30

def self.IsObserver()
  true
end

Instance Method Details

#Before(instance, method, args) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/sapphire/Plugins/FireBug/FirebugPlugin.rb', line 13

def Before(instance, method, args)
  return if ENV["firebug"] != "true"
  profile = Selenium::WebDriver::Firefox::Profile.new
  version = '1.9.1'
  profile.add_extension(File.expand_path("../firebug-#{version}.xpi", __FILE__))

  profile["extensions.firebug.currentVersion"] = "999"
  profile["extensions.firebug.allPagesActivation"] = "on"
  ['console', 'net', 'script'].each do |feature|
    profile["extensions.firebug.#{feature}.enableSites"] = true
  end

  profile["extensions.firebug.previousPlacement"] = 3

  args << { :profile => profile }
end