capybara-headless_chrome 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capybara/headless_chrome/driver.rb +14 -0
- data/lib/capybara/headless_chrome/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd53f1c095c3362f804d27203aa7faa711ed97c7
|
4
|
+
data.tar.gz: 5fcbed1d9a9641012b42b52dd635957776eadb3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4ac77dc3856fb148b72f2ae27fad53b217206a56c862157b21b886536a2f27ad62a93558cfa44e1e3823ff23c3e4edc56a2188dd12a75e3b98375e5b46c4a26
|
7
|
+
data.tar.gz: 1e19146d46e3b3df92ed6c812ed17e586679f49d5456b72f61d4b8c0996138723867c3128645ebcb515b8f78d683328dccd38b0c3b1f846795d1888947903986
|
@@ -9,6 +9,7 @@ module Capybara
|
|
9
9
|
def initialize app
|
10
10
|
super(app, browser: :chrome, desired_capabilities: chrome_capabilities)
|
11
11
|
configure_downloads
|
12
|
+
fix_whitespace
|
12
13
|
end
|
13
14
|
|
14
15
|
def downloads
|
@@ -60,6 +61,19 @@ module Capybara
|
|
60
61
|
}
|
61
62
|
)
|
62
63
|
end
|
64
|
+
|
65
|
+
def fix_whitespace
|
66
|
+
Capybara::Selenium::Node.prepend Module.new {
|
67
|
+
def visible_text
|
68
|
+
super
|
69
|
+
.gsub(/[\u200b\u200e\u200f]/, '')
|
70
|
+
.gsub(/[\ \n\f\t\v\u2028\u2029]+/, ' ')
|
71
|
+
.gsub(/\A[[:space:]&&[^\u00a0]]+/, '')
|
72
|
+
.gsub(/[[:space:]&&[^\u00a0]]+\z/, '')
|
73
|
+
.tr("\u00a0", ' ')
|
74
|
+
end
|
75
|
+
}
|
76
|
+
end
|
63
77
|
end
|
64
78
|
end
|
65
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-headless_chrome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chromedriver-helper
|