sauce 3.7.0 → 3.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sauce/capybara.rb +16 -0
- data/lib/sauce/config.rb +3 -2
- data/lib/sauce/selenium.rb +16 -1
- data/lib/sauce/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a99d68f609df983d19a5e98b8be9d3cb05c76d9
|
4
|
+
data.tar.gz: 2a70a5b41fa6542404c89c303584061c6a431161
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76836c4c7410c30332fe8dac1900ec47d6a95ca62664805bc36973752e570446a72a57dedaba7498ac909d0e3e0e85b439defe4c9b6d5a92a93f90d4f129f881
|
7
|
+
data.tar.gz: 50b464bb550ac59557d1c986ff2d420ad9eb181d5ba25833d0d6a7804a4fca206deb4026f67610559a1e533126e6886df0aa37c4566b2d1dd345e2ea21990b5a
|
data/lib/sauce/capybara.rb
CHANGED
@@ -43,6 +43,7 @@ module Sauce
|
|
43
43
|
alias :base_find_window :find_window
|
44
44
|
alias :base_execute_script :execute_script
|
45
45
|
alias :base_evaluate_script :evaluate_script
|
46
|
+
alias :base_reset! :reset!
|
46
47
|
|
47
48
|
@methods_to_retry = [:visit, :current_url,
|
48
49
|
:within_frame, :within_window, :find_window, :source,
|
@@ -128,6 +129,21 @@ module Sauce
|
|
128
129
|
@using_rspec_browser = nil
|
129
130
|
end
|
130
131
|
|
132
|
+
def reset!
|
133
|
+
begin
|
134
|
+
base_reset!
|
135
|
+
|
136
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
137
|
+
session_finished = e.message.match "ERROR Job is not in progress"
|
138
|
+
|
139
|
+
if @browser.config[:suppress_session_quit_failures] && session_finished
|
140
|
+
@browser=nil
|
141
|
+
else
|
142
|
+
raise e
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
131
147
|
def render(path)
|
132
148
|
browser.save_screenshot path
|
133
149
|
end
|
data/lib/sauce/config.rb
CHANGED
@@ -28,7 +28,8 @@ module Sauce
|
|
28
28
|
:start_tunnel => true,
|
29
29
|
:start_local_application => true,
|
30
30
|
:warn_on_skipped_integration => true,
|
31
|
-
:skip_connection_test => false
|
31
|
+
:skip_connection_test => false,
|
32
|
+
:suppress_session_quit_failures => false
|
32
33
|
}
|
33
34
|
|
34
35
|
DEFAULT_BROWSERS = {
|
@@ -70,7 +71,7 @@ module Sauce
|
|
70
71
|
selenium-version command-timeout prerun prerun-args screen-resolution
|
71
72
|
disable-popup-handler avoid-proxy public name iedriver-version parent-tunnel
|
72
73
|
time-zone device-orientation record-logs webdriver-remote-quiet-exceptions
|
73
|
-
|
74
|
+
chromedriver-version chromeOptions
|
74
75
|
}
|
75
76
|
|
76
77
|
def self.get_application_port
|
data/lib/sauce/selenium.rb
CHANGED
@@ -91,8 +91,23 @@ module Sauce
|
|
91
91
|
|
92
92
|
def stop
|
93
93
|
Sauce.logger.debug "Thread #{Thread.current.object_id} quitting driver #{@driver.session_id}"
|
94
|
-
@driver
|
94
|
+
quit_and_maybe_rescue @driver
|
95
95
|
Sauce.logger.debug "Thread #{Thread.current.object_id} has quit driver #{@driver.session_id}"
|
96
96
|
end
|
97
|
+
|
98
|
+
def quit
|
99
|
+
quit_and_maybe_rescue raw_driver
|
100
|
+
end
|
101
|
+
|
102
|
+
def quit_and_maybe_rescue driver
|
103
|
+
begin
|
104
|
+
driver.quit
|
105
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
106
|
+
session_finished = e.message.match "has already finished, and can't receive further commands"
|
107
|
+
unless @config[:suppress_session_quit_failures] && session_finished
|
108
|
+
raise e
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
97
112
|
end
|
98
113
|
end
|
data/lib/sauce/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sauce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Lacey
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2016-
|
17
|
+
date: 2016-02-10 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rspec
|