gphotos 0.1.3.1 → 0.1.4

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: 19226640730b873ce5e17db8e28d507a20ca1274
4
- data.tar.gz: d041c96e32325de55653fe05dbb99c6c8b0a740f
3
+ metadata.gz: bc8126bd61916aa2609a4f0e08881eac077511d2
4
+ data.tar.gz: f7db8abf57da883e9e5dad6992a8f769ae7fb3a8
5
5
  SHA512:
6
- metadata.gz: 16c7277fdf15f3a3449941989328bc7901fe025650ff81cbe591503f0af80dc9fd11a8ec8bf8bff857e928d8bb3367f339124048f142c3fa2533ed52f897441c
7
- data.tar.gz: 8bb65b9957220f5e14763d19df86db9235bf4733f71e299202722d0d140f454f57814191bc7ae660e460b1f623dd6beb283a68d1384520e3d80b973112372d2f
6
+ metadata.gz: 2c05df275baa76322fc761f077a1bdfbb9fde0ffbd435e7822d57014326bf6e66e9a7293b8a6e0d6bbe8c1b0d814315238396d0fadeb28dbde7d5863b73c37e4
7
+ data.tar.gz: bd777e11f348838be46099659031fe14e6a69c95cb8f05fe04893e38bca8de9e9b773acd85b983920bfd7219580e393c37112851aa001a4a5230ede28405285d
@@ -9,6 +9,7 @@ module Gphotos
9
9
  prefs = {"profile" => {"managed_default_content_settings" => {"images" => 2}}}
10
10
  @driver = Selenium::WebDriver.for(:chrome, :args => ["--user-data-dir=#{user_data_dir}"], :prefs => prefs)
11
11
  @driver.manage.timeouts.implicit_wait = options[:page_timeout]
12
+ @wait = Selenium::WebDriver::Wait.new(:timeout => 3)
12
13
  @wait_upload = Selenium::WebDriver::Wait.new(:timeout => options[:upload_timeout])
13
14
  @workaround_applied = false
14
15
  login(email, passwd, passwd_exec)
@@ -21,17 +22,27 @@ module Gphotos
21
22
  return
22
23
  end
23
24
 
24
- element = @driver.find_element(:id => 'Email')
25
- element.send_keys(email)
26
- element.submit
25
+ element = nil
26
+
27
+ begin
28
+ @wait.until do
29
+ element = @driver.find_element(:css => 'input[type="email"]')
30
+ element.displayed?
31
+ end
32
+ rescue Selenium::WebDriver::Error::TimeOutError
33
+ else
34
+ element.send_keys(email + "\n")
35
+ end
27
36
 
28
37
  if !passwd and passwd_exec
29
38
  passwd = %x{#{passwd_exec}}.strip
30
39
  end
31
40
 
32
- element = @driver.find_element(:id => 'Passwd')
33
- element.send_keys(passwd)
34
- element.submit
41
+ @wait.until do
42
+ element = @driver.find_element(:css => 'input[type="password"]')
43
+ element.displayed?
44
+ end
45
+ element.send_keys(passwd + "\n")
35
46
 
36
47
  @driver.find_element(:css => 'input[type="file"]')
37
48
  end
@@ -1,3 +1,3 @@
1
1
  module Gphotos
2
- VERSION = "0.1.3.1"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gphotos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zhong Jianxin