webdriver 0.11.1 → 0.16.0

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
  SHA256:
3
- metadata.gz: '058c839135e9954955e4842bdaacc7fab439f222bd60e6550016d640a78b7a32'
4
- data.tar.gz: ac947fcc4dcdb05ce6801ae4647515bc0893a91b8026f93d5377fee8e695248a
3
+ metadata.gz: '06359ad784edfb1c36772e546118e9554b47f568809e973d7dc031feef455610'
4
+ data.tar.gz: '09181b8f4785ace66f05a9aaf093d851e3cbf12097edcb7fca6005dc5488a6f2'
5
5
  SHA512:
6
- metadata.gz: 462c91d2b584e3c89ac5156ed83fc285febc80fa40be16dccb65f7b1ee808625205dedc960e342cf7e16755060c9f57f0c798cb024daf4b052116befdc0dac0e
7
- data.tar.gz: d9ffb7e9ae5cff9523ce4103010e60e9877df6d6dace8e63140911cc007b43ecf939e9610ecda14de72512bd0f491da6ded1b97080623f8821ab4b5dcf8c933b
6
+ metadata.gz: 90cb0deb1765f593d90282d18f73a7992ebe830785f98d4458c85af6684b85e27c59946999e2c49e9bf82440df5276dc362903c783787e187748fcec05f9e860
7
+ data.tar.gz: b115889e6c10a90e3cb9b1aa511ecd95c31d39a58fb38bfa4bdc03932778de786830337ffcd5ecff928e9fd0da3628a656f59b153392962ec224b86572712338
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webdriver (0.11.1)
4
+ webdriver (0.16.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,8 +1,12 @@
1
1
  module Webdriver
2
2
  class Connection
3
- def initialize endpoint
3
+ def initialize endpoint, open_timeout: 3, read_timeout: 5, write_timeout: 5
4
4
  uri = URI(endpoint)
5
5
  @http = Net::HTTP.new uri.hostname, uri.port
6
+ @http.open_timeout = open_timeout
7
+ @http.read_timeout = read_timeout
8
+ @http.write_timeout = write_timeout
9
+
6
10
  @mutex = Mutex.new
7
11
  end
8
12
 
@@ -54,10 +58,22 @@ module Webdriver
54
58
  else # everything else works like this
55
59
  value
56
60
  end
61
+ when 7
62
+ raise Webdriver::NoSuchElementError.new value.dig("message")
63
+ when 8
64
+ raise Webdriver::NoSuchFrameError.new body[:id]
57
65
  when 10
58
- raise Webdriver::StaleElementReferenceError
66
+ raise Webdriver::StaleElementReferenceError.new path
59
67
  when 11
60
- raise Webdriver::ElementNotInteractableError
68
+ raise Webdriver::ElementNotInteractableError.new path
69
+ when 13
70
+ raise Webdriver::UnknownErrorUnhandledInspectorError.new value.dig("message")
71
+ when 26
72
+ raise Webdriver::UnexpectedAlertOpen.new value.dig("message")
73
+ when 27
74
+ raise Webdriver::NoSuchAlert.new value.dig("message")
75
+ when 28
76
+ raise Webdriver::ScriptTimeout.new value.dig("message")
61
77
  when 1..nil
62
78
  error_message = value.dig("message")
63
79
  raise "#{status}: #{error_message}"
@@ -1,6 +1,18 @@
1
1
  module Webdriver
2
+ # 7
3
+ class NoSuchElementError < StandardError; end
4
+ # 7
5
+ class NoSuchFrameError < StandardError; end
2
6
  # 10
3
7
  class StaleElementReferenceError < StandardError; end
4
8
  # 11
5
9
  class ElementNotInteractableError < StandardError; end
10
+ # 13
11
+ class UnknownErrorUnhandledInspectorError < StandardError; end
12
+ # 26
13
+ class UnexpectedAlertOpen < StandardError; end
14
+ # 27
15
+ class NoSuchAlert < StandardError; end
16
+ # 28
17
+ class ScriptTimeout < StandardError; end
6
18
  end
@@ -1,3 +1,3 @@
1
1
  module Webdriver
2
- VERSION = "0.11.1"
2
+ VERSION = "0.16.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-22 00:00:00.000000000 Z
11
+ date: 2020-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler