capybara-firebug 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/capybara-firebug.gemspec +1 -1
- data/lib/capybara/firebug.rb +18 -13
- metadata +3 -3
data/capybara-firebug.gemspec
CHANGED
data/lib/capybara/firebug.rb
CHANGED
@@ -1,23 +1,28 @@
|
|
1
1
|
require 'selenium/webdriver'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
class Selenium::WebDriver::Firefox::Profile
|
4
|
+
def enable_firebug
|
5
|
+
add_extension(File.expand_path("../firebug-1.6.2.xpi", __FILE__))
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
# Prevent "Welcome!" tab
|
8
|
+
self["extensions.firebug.currentVersion"] = "999"
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
# Enable for all sites.
|
11
|
+
self["extensions.firebug.allPagesActivation"] = "on"
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
# Enable all features.
|
14
|
+
['console', 'net', 'script'].each do |feature|
|
15
|
+
self["extensions.firebug.#{feature}.enableSites"] = true
|
16
|
+
end
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
# Closed by default.
|
19
|
+
self["extensions.firebug.previousPlacement"] = 3
|
20
|
+
end
|
21
|
+
end
|
20
22
|
|
23
|
+
Capybara.register_driver :selenium_with_firebug do |app|
|
24
|
+
profile = Selenium::WebDriver::Firefox::Profile.new
|
25
|
+
profile.enable_firebug
|
21
26
|
Capybara::Driver::Selenium.new(app, :browser => :firefox, :profile => profile)
|
22
27
|
end
|
23
28
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- John Firebaugh
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-03-
|
17
|
+
date: 2011-03-07 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|