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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e7946e9abcb06c37b3cb4c987f42c8cac8352eb
4
- data.tar.gz: c502c4cc6791fced6b2edf6c536ad140240c8c06
3
+ metadata.gz: 63edc5a5ee442bcb065834f9de1db3b2b21e5bc6
4
+ data.tar.gz: 08b242da4a381813d225e24934c6bf06fbe75031
5
5
  SHA512:
6
- metadata.gz: 0de60adc30dcc940c73fdedc464818fb0ce59069d32b1b91f0dd2792cb029db5934b74e1b436174bdf62743b4ffcfafdd69b77734f5e32ecc2edec0aecd9e579
7
- data.tar.gz: 096bbf152ae5c5e589a26d1bcdd6a5a65825901d6091493b9cf856a9a7211abcf9bf948a4d63b61df4591ae8c790dc67f9e75010619d7faf237de68e0baea237
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.2"
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] #{selector}..."
71
+ "[FILL] #{text}..."
64
72
  send_key(text)
65
73
  end
66
74
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gogo_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - gogotanaka