gogo_driver 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gogo_driver.gemspec +1 -1
- data/lib/gogo_driver.rb +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63edc5a5ee442bcb065834f9de1db3b2b21e5bc6
|
4
|
+
data.tar.gz: 08b242da4a381813d225e24934c6bf06fbe75031
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8003f57c591b94f34e7797e871bfb8482d0b2df614e34177f927e73f0d072ab2dcf450f17b6572f1753b8362ef1aa7592b68217cd24b3711b7c1b0c34bada3ae
|
7
|
+
data.tar.gz: 15825fac887589fc0551e2132a3341f55081bd320185caf7848f8966d4be806932c734601878fea29677e7950caae16d9d33b9946f8d3ce56ee28b5c1a1e699a
|
data/gogo_driver.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "gogo_driver"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.3"
|
8
8
|
spec.authors = ["gogotanaka"]
|
9
9
|
spec.email = ["mail@tanakakazuki.com"]
|
10
10
|
spec.summary = %q{Super simple web driver.}
|
data/lib/gogo_driver.rb
CHANGED
@@ -21,6 +21,14 @@ class GogoDriver
|
|
21
21
|
@driver.find_element(css: selector)
|
22
22
|
end
|
23
23
|
|
24
|
+
# http://stackoverflow.com/questions/11908249/debugging-element-is-not-clickable-at-point-error
|
25
|
+
def scroll(selector)
|
26
|
+
logging "[SCROLL] #{selector}..."
|
27
|
+
element = find(selector)
|
28
|
+
@driver.driver.execute_script "window.scrollTo(#{element.location.x},#{element.location.y})"
|
29
|
+
element
|
30
|
+
end
|
31
|
+
|
24
32
|
def finds(selector)
|
25
33
|
@driver.find_elements(css: selector)
|
26
34
|
end
|
@@ -60,7 +68,7 @@ end
|
|
60
68
|
class Selenium::WebDriver::Element
|
61
69
|
def fill(text)
|
62
70
|
$focus = self
|
63
|
-
"[FILL] #{
|
71
|
+
"[FILL] #{text}..."
|
64
72
|
send_key(text)
|
65
73
|
end
|
66
74
|
|