appium_failure_helper 1.14.0 → 1.15.0
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: 6693ea274ba569af7ec3440dcd29348769a3860920dc6b88f35b0d543c145183
|
|
4
|
+
data.tar.gz: 416b624ae5218f624d817c488498068237237fd52dca0b51aa603f488cc59c46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2140d8b30afd01b22e5f23960efab1f7654c01727efce1e8f3687e4a4a10a76c589c083a7ee71dd79b95b0b4ee925b51bc9694d835789288a112052fec54a10
|
|
7
|
+
data.tar.gz: cee9beef7f24c1b839ab054861fcb37e2c681ba2140a36631f7d62158d7eb9c7526fe7c6db68a30406c05f86d16372950779b06d1037c884313cff1ac88ae1da
|
|
@@ -2,10 +2,11 @@ module AppiumFailureHelper
|
|
|
2
2
|
module Analyzer
|
|
3
3
|
def self.triage_error(exception)
|
|
4
4
|
case exception
|
|
5
|
-
when
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
when *[
|
|
6
|
+
Selenium::WebDriver::Error::NoSuchElementError,
|
|
7
|
+
Selenium::WebDriver::Error::TimeoutError,
|
|
8
|
+
(Appium::Core::Wait::TimeoutError if defined?(Appium::Core::Wait::TimeoutError))
|
|
9
|
+
].compact
|
|
9
10
|
:locator_issue
|
|
10
11
|
when Selenium::WebDriver::Error::ElementNotInteractableError
|
|
11
12
|
:visibility_issue
|
|
@@ -81,7 +82,7 @@ module AppiumFailureHelper
|
|
|
81
82
|
end
|
|
82
83
|
end
|
|
83
84
|
|
|
84
|
-
candidates.sort_by { |c| -c[:score] }.first
|
|
85
|
+
candidates.sort_by { |c| -c[:score] }.first(3)
|
|
85
86
|
end
|
|
86
87
|
|
|
87
88
|
private
|
|
@@ -59,6 +59,7 @@ module AppiumFailureHelper
|
|
|
59
59
|
def self.extract_from_exception(exception)
|
|
60
60
|
# Busca a primeira linha do backtrace que seja um arquivo .rb do projeto
|
|
61
61
|
location = exception.backtrace.find { |line| line.include?('.rb') && !line.include?('gems') }
|
|
62
|
+
location ||= exception.backtrace&.first
|
|
62
63
|
return {} unless location
|
|
63
64
|
|
|
64
65
|
# Usa o Regex que funciona em Windows e Unix para extrair caminho e linha
|