gogo_driver 0.1.0 → 0.1.1
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 +19 -0
- 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: 3db30504b0b20d6f42dac5a3ed5047c94fdf8925
|
4
|
+
data.tar.gz: 54a55414e56e949dd391115ca14cbb1d60a1ca5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71a169a6ca5ce82d51074c89c767bb8bac66be5300e1b095062df96dd587423d757fc39721eaa5760a439f5e210ca96874d5b5552a4921aece33cdc338ed6268
|
7
|
+
data.tar.gz: 785290881a14d6ad5a9a9127aaaf4a15ba1dad3946bd3cce43b58a07344280c35974be578b1f878b10ec040de5681f29d08c39d40a9b70c38baa49e0786de934
|
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.1"
|
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
@@ -19,6 +19,10 @@ class GogoDriver
|
|
19
19
|
@driver.find_element(css: selector)
|
20
20
|
end
|
21
21
|
|
22
|
+
def finds(selector)
|
23
|
+
@driver.find_elements(css: selector)
|
24
|
+
end
|
25
|
+
|
22
26
|
def has?(selector)
|
23
27
|
!!find(selector)
|
24
28
|
rescue Selenium::WebDriver::Error::NoSuchElementError
|
@@ -43,3 +47,18 @@ class GogoDriver
|
|
43
47
|
@driver.respond_to?(method) ? @driver.send(method, *args, &block) : super
|
44
48
|
end
|
45
49
|
end
|
50
|
+
|
51
|
+
class Selenium::WebDriver::Element
|
52
|
+
def fill(text)
|
53
|
+
$focus = self
|
54
|
+
send_key(text)
|
55
|
+
end
|
56
|
+
|
57
|
+
def find(selector)
|
58
|
+
find_element(css: selector)
|
59
|
+
end
|
60
|
+
|
61
|
+
def finds(selector)
|
62
|
+
find_elements(css: selector)
|
63
|
+
end
|
64
|
+
end
|