webdriver 0.8.0 → 0.9.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: d87f76df4f9ba0c371bcf23e243711f4d349b55f5f6bec2d54c0d44ac133a907
4
- data.tar.gz: ab4627937fb544a76af190427663ed5d0ab92bdcdc5dfb4900b05adce468a2e5
3
+ metadata.gz: ae35035ea60b2dde14a44927d1b808aafe264f0875c61dbd7fff3eac0a9774ee
4
+ data.tar.gz: 46e3d6220ba809b4dc65f86c06c3b0fe42a7d43beedd1517a6aaeccb9f51749e
5
5
  SHA512:
6
- metadata.gz: 9357323d6a5005b1fda5dd8726b515f37e840f40a8c91164723f53b584b70ede3878b9fa808e44d8b3f2b4dcb79c4eead51fa7a39ff56aa3810e11d051ccbba8
7
- data.tar.gz: 31a8b9f0e6263bff0f3ca6f10ccf6a2901b8f4c0b09f0e41d03c6b663d109a407eb0454667209d80007b17578329c14b6388f4f46080593ef0fe354e935e8e9f
6
+ metadata.gz: 03722631a70029443759a20e8ee974052c6a1c5a985e72e030f41348ce5cd804b50220dbc0ef2f5e7ef64202fe0ab2190db99ea74245872088215cbf12821d1b
7
+ data.tar.gz: 3509414223270d097563fe78348155729d1c942dd7600b2908eaa5487ec1b61b758cd49786d60c567ead13f8fa918d52082dd2a08d7bb5202da3e859d8f3806e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webdriver (0.8.0)
4
+ webdriver (0.9.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,39 +1,11 @@
1
- # Webdriver
1
+ # webdriver
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/webdriver`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ A Ruby https://www.w3.org/TR/webdriver/ driver
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ ## Notes for implementators
6
6
 
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'webdriver'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install webdriver
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/webdriver.
36
-
37
- ## License
38
-
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
7
+ - `element.value!` is slow when compared to JavaScript `el.value = ...`
8
+ - element visibility helper `element.displayed?`
9
+ hitrate.
10
+ - Remember to use JavaScript multiline strings \` \` in `session.async_exec`
11
+ - looks like delaying 0.5s between element find and click improves
@@ -11,6 +11,8 @@ module Webdriver
11
11
  end
12
12
 
13
13
  require_relative "webdriver/version"
14
+ require_relative "webdriver/errors"
15
+
14
16
  require_relative "webdriver/connection"
15
17
  require_relative "webdriver/prefix_connection"
16
18
 
@@ -47,9 +47,11 @@ module Webdriver
47
47
  else # everything else works like this
48
48
  value
49
49
  end
50
+ when 10
51
+ raise Webdriver::StaleElementReferenceError
52
+ when 11
53
+ raise Webdriver::ElementNotInteractableError
50
54
  when 1..nil
51
- # 10: stale element reference: element is not attached to the page document
52
- # 11: element not interactable
53
55
  error_message = value.dig("message")
54
56
  raise "#{status}: #{error_message}"
55
57
  else
@@ -0,0 +1,6 @@
1
+ module Webdriver
2
+ # 10
3
+ class StaleElementReferenceError < StandardError; end
4
+ # 11
5
+ class ElementNotInteractableError < StandardError; end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module Webdriver
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.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.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-25 00:00:00.000000000 Z
11
+ date: 2020-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -157,6 +157,7 @@ files:
157
157
  - lib/webdriver/connection.rb
158
158
  - lib/webdriver/cookie.rb
159
159
  - lib/webdriver/element.rb
160
+ - lib/webdriver/errors.rb
160
161
  - lib/webdriver/prefix_connection.rb
161
162
  - lib/webdriver/session.rb
162
163
  - lib/webdriver/version.rb
@@ -166,7 +167,7 @@ homepage: https://www.github.com/matti/webdriver
166
167
  licenses:
167
168
  - MIT
168
169
  metadata: {}
169
- post_install_message:
170
+ post_install_message:
170
171
  rdoc_options: []
171
172
  require_paths:
172
173
  - lib
@@ -182,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
183
  version: '0'
183
184
  requirements: []
184
185
  rubygems_version: 3.0.6
185
- signing_key:
186
+ signing_key:
186
187
  specification_version: 4
187
188
  summary: webdriver
188
189
  test_files: []