watir-dom-wait 0.3.2 → 0.3.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: 8da70c7e860203cf57a19b7fdf423af4e5ce90ab
4
- data.tar.gz: b2e1ecf9fc2834274b2a2f8cb6f82a9affe7f9ec
3
+ metadata.gz: 7f58c8ee42532287c905e965095b1b51b10d8a5a
4
+ data.tar.gz: 68916d0b9e8a00999a460428727297b91378697a
5
5
  SHA512:
6
- metadata.gz: 8c52446146fd41d3b0d3f45048bc8d0f500b46e7cb0aa6a84189e81df8030ff28c8cfc32941e83460a3e80f1386dc423998c6da10f3d6aa14f5f63b5a0ad0a50
7
- data.tar.gz: fa4c3b011bfc92646d022ea75e65ece0f1d439bc9baa271880772a668c597a4f98c2234dbc2a769d0306d71be308a1a4e5210ea272528a8f51ba6ed04178bab7
6
+ metadata.gz: cdebe4f8e76f264593f2ed3ce7af40153a9b4e20778936586bd54a62b2403d6709a77a4494420a7b825cd807352149b8eca4a41ed43bacd3b50d80d1ad206ab4
7
+ data.tar.gz: 794bba96d303eb4aae5380bf25dcaf1e561a5330209455ef1518a2e0eb8671792fced2034929fa95c6a472dc54c659cb1cd83240e9bf8c0d7a08864d3524f6b0
@@ -17,19 +17,21 @@ module Watir
17
17
  #
18
18
 
19
19
  def dom_changed?(delay: 1.1)
20
- driver.manage.timeouts.script_timeout = delay + 1
21
- driver.execute_async_script(DOM_WAIT_JS, wd, delay)
22
- rescue Selenium::WebDriver::Error::StaleElementReferenceError
23
- retry
24
- rescue Selenium::WebDriver::Error::JavascriptError => error
25
- # sometimes we start script execution before new page is loaded and
26
- # in rare cases ChromeDriver throws this error, we just swallow it and retry
27
- retry if error.message.include?('document unloaded while waiting for result')
28
- raise
29
- ensure
30
- # TODO: make sure we rollback to user-defined timeout
31
- # blocked by https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/6608
32
- driver.manage.timeouts.script_timeout = 1
20
+ element_call do
21
+ begin
22
+ driver.manage.timeouts.script_timeout = delay + 1
23
+ driver.execute_async_script(DOM_WAIT_JS, wd, delay)
24
+ rescue Selenium::WebDriver::Error::JavascriptError => error
25
+ # sometimes we start script execution before new page is loaded and
26
+ # in rare cases ChromeDriver throws this error, we just swallow it and retry
27
+ retry if error.message.include?('document unloaded while waiting for result')
28
+ raise
29
+ ensure
30
+ # TODO: make sure we rollback to user-defined timeout
31
+ # blocked by https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/6608
32
+ driver.manage.timeouts.script_timeout = 1
33
+ end
34
+ end
33
35
  end
34
36
  end # Element
35
37
  end # Watir
@@ -1,15 +1,10 @@
1
- require "pry"
2
1
  require "watir-dom-wait"
3
2
 
4
3
  RSpec.configure do |spec|
5
4
  spec.filter_run_excluding bug: /\d+/
6
5
 
7
6
  spec.before(:all) do
8
- opts = {}
9
- if ENV['TRAVIS']
10
- Selenium::WebDriver::Chrome.path = "#{File.dirname(__FILE__)}/../bin/google-chrome"
11
- opts[:args] = ['no-sandbox']
12
- end
7
+ Selenium::WebDriver::Chrome.path = "#{File.dirname(__FILE__)}/../bin/google-chrome" if ENV['TRAVIS']
13
8
  @browser = Watir::Browser.new(:chrome, opts)
14
9
  @browser.goto "data:text/html,#{File.read('spec/support/html/wait_for_dom.html')}"
15
10
  end
@@ -19,7 +14,6 @@ RSpec.configure do |spec|
19
14
  end
20
15
 
21
16
  spec.after(:each) do |example|
22
- binding.pry if example.exception && ENV['DEBUG']
23
17
  @browser.refresh
24
18
  end
25
19
  end
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "watir-dom-wait"
6
- spec.version = "0.3.2"
6
+ spec.version = "0.3.3"
7
7
  spec.authors = ["Alex Rodionov"]
8
8
  spec.email = %w(p0deje@gmail.com)
9
9
  spec.description = "Watir extension which provides with method to check for DOM changes."
@@ -16,10 +16,9 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_dependency "watir", ">= 6.0"
19
+ spec.add_dependency "watir", ">= 6.4"
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "rspec"
24
- spec.add_development_dependency "pry"
25
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-dom-wait
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-27 00:00:00.000000000 Z
11
+ date: 2017-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: watir
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: '6.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '6.0'
26
+ version: '6.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: pry
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  description: Watir extension which provides with method to check for DOM changes.
84
70
  email:
85
71
  - p0deje@gmail.com
@@ -121,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
107
  version: '0'
122
108
  requirements: []
123
109
  rubyforge_project:
124
- rubygems_version: 2.5.2
110
+ rubygems_version: 2.6.11
125
111
  signing_key:
126
112
  specification_version: 4
127
113
  summary: Watir extension which provides with method to check for DOM changes.