Ifd_Automation 2.9.5 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7aa5ba03e027d94b19d3a610eca9f6aee4a8e9b9e78ccc5e284639defb649b
|
4
|
+
data.tar.gz: 81ec68a13e800c0f170ef4f611798c3ae12d5ce79759770c99061fbb3a9b0028
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17a00cfcf3730de780ba0d6838ff60f60c613690d5737252e7e89032609700ef9cb1e2aac933716e6e5b1ed50718920a6014a95c1161f703e2f72f0c7dc59505
|
7
|
+
data.tar.gz: 7d68670adb21c67c280777ce71160096543fc3ae8d81a35cfca9e52eb0367f5963c7c2e626ca4c885285ae80de23556f59b6c6627b786dee1327c7dca448fcdb
|
@@ -1,72 +1,72 @@
|
|
1
|
-
module ToleranceForSeleniumSyncIssues
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
# module ToleranceForSeleniumSyncIssues
|
2
|
+
# RETRY_ERRORS = %w[
|
3
|
+
# Capybara::ElementNotFound
|
4
|
+
# Spec::Expectations::ExpectationNotMetError
|
5
|
+
# RSpec::Expectations::ExpectationNotMetError
|
6
|
+
# Minitest::Assertion
|
7
|
+
# Capybara::Poltergeist::ClickFailed
|
8
|
+
# Capybara::ExpectationNotMet
|
9
|
+
# Selenium::WebDriver::Error::StaleElementReferenceError
|
10
|
+
# Selenium::WebDriver::Error::NoAlertPresentError
|
11
|
+
# Selenium::WebDriver::Error::ElementNotVisibleError
|
12
|
+
# Selenium::WebDriver::Error::NoSuchFrameError
|
13
|
+
# Selenium::WebDriver::Error::NoAlertPresentError
|
14
|
+
# Selenium::WebDriver::Error::JavascriptError
|
15
|
+
# Selenium::WebDriver::Error::UnknownError
|
16
|
+
# Selenium::WebDriver::Error::NoSuchAlertError
|
17
|
+
# ]
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
# class CapybaraWrapper
|
20
|
+
# def self.default_max_wait_time
|
21
|
+
# if Capybara.respond_to?(:default_max_wait_time)
|
22
|
+
# Capybara.default_max_wait_time
|
23
|
+
# else
|
24
|
+
# Capybara.default_wait_time
|
25
|
+
# end
|
26
|
+
# end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
28
|
+
# def self.default_max_wait_time=(value)
|
29
|
+
# if Capybara.respond_to?(:default_max_wait_time=)
|
30
|
+
# Capybara.default_max_wait_time = value
|
31
|
+
# else
|
32
|
+
# Capybara.default_wait_time = value
|
33
|
+
# end
|
34
|
+
# end
|
35
|
+
# end
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
# class Patiently
|
38
|
+
# WAIT_PERIOD = 0.05
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
40
|
+
# def patiently(seconds, &block)
|
41
|
+
# started = Time.now
|
42
|
+
# tries = 0
|
43
|
+
# begin
|
44
|
+
# tries += 1
|
45
|
+
# block.call
|
46
|
+
# rescue Exception => e
|
47
|
+
# raise e unless retryable_error?(e)
|
48
|
+
# raise e if (Time.now - started > seconds && tries >= 2)
|
49
|
+
# sleep(WAIT_PERIOD)
|
50
|
+
# raise Capybara::FrozenInTime, "time appears to be frozen, Capybara does not work with libraries which freeze time, consider using time travelling instead" if Time.now == started
|
51
|
+
# retry
|
52
|
+
# end
|
53
|
+
# end
|
54
54
|
|
55
|
-
|
55
|
+
# private
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
57
|
+
# def retryable_error?(e)
|
58
|
+
# RETRY_ERRORS.include?(e.class.name)
|
59
|
+
# end
|
60
|
+
# end
|
61
61
|
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
end
|
63
|
+
# def patiently(seconds = CapybaraWrapper.default_max_wait_time, &block)
|
64
|
+
# if page.driver.wait?
|
65
|
+
# Patiently.new.patiently(seconds, &block)
|
66
|
+
# else
|
67
|
+
# block.call
|
68
|
+
# end
|
69
|
+
# end
|
70
|
+
# end
|
71
71
|
|
72
|
-
World(ToleranceForSeleniumSyncIssues)
|
72
|
+
# World(ToleranceForSeleniumSyncIssues)
|