appium_failure_helper 1.1.3 → 1.1.4

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: 3436268826107494e9e5ae0049106b4ae0d7a9d01609b0ea68e1d0e0474a07bb
4
- data.tar.gz: cc600a9229697214f2e88a3b6c4ece1d7fa90b09ee1e525a32892679231451e5
3
+ metadata.gz: 422c6af375ea6308ceaadf40036c7e1ff5187ed660830c4a403abcea94553551
4
+ data.tar.gz: 19ffb9d6d32d70274087584bce03005694fc75c6ea17d1abf2cc4c938c448d25
5
5
  SHA512:
6
- metadata.gz: ff3fd06ae96eb6ddec8170791c2c1cdb88c5266a5dd773c47ae155d7a981776b4a2f78fd82f826409822bec789b8b0047fd2060e3767ae87df1a440f52bd140f
7
- data.tar.gz: a837e539fcf0f9dbbb854e80567ec5680a73914e3adeddb7a2f5dde23d853d0de06092b9c4244db038ae0e0cf495a3654b36a12e4a167ea332fc99fcefd21cd8
6
+ metadata.gz: d0ed3e523bcf4ee55edf522c4a93dbca4d1c60be1654ab87fbb625bce741dbb9df9eadd2458f33d6b9df8405cf9a8a775431982d46bb1a8d45b40983b995657b
7
+ data.tar.gz: b903344bf3dbc2176f3cf21c217082e8c5a739bd7e2ff8cd9a7dda4a7b066a0a75cd74ead27e7a4a4b7a6fe557ba86f02aa6e8fdd1fd633af8b2e31396b45999
@@ -29,15 +29,21 @@ module AppiumFailureHelper
29
29
  /element with locator ['"]?(#?\w+)['"]?/i,
30
30
  /(?:could not be found|cannot find element) using (.+?)=['"]?([^'"]+)['"]?/i,
31
31
  /no such element: Unable to locate element: {"method":"([^"]+)","selector":"([^"]+)"}/i,
32
- /(?:with the resource-id|with the accessibility-id) ['"]?(.+?)['"]?/i
32
+ /(?:with the resource-id|with the accessibility-id) ['"]?(.+?)['"]?/i,
33
+ /using "([^"]+)" with value "([^"]+)"/
33
34
  ]
34
35
  patterns.each do |pattern|
35
- match = message.match(pattern)
36
- if match
37
- info[:selector_value] = match.captures.last.strip.gsub(/['"]/, '')
38
- info[:selector_type] = match.captures.size > 1 ? match.captures[0].strip.gsub(/['"]/, '') : 'id'
39
- return info
40
- end
36
+ match = message.match(pattern)
37
+ if match
38
+ if match.captures.size == 2
39
+ info[:selector_type] = match.captures[0].strip.gsub(/['"]/, '')
40
+ info[:selector_value] = match.captures[1].strip.gsub(/['"]/, '')
41
+ else
42
+ info[:selector_value] = match.captures.last.strip.gsub(/['"]/, '')
43
+ info[:selector_type] = 'id' # Padrão para regex com 1 captura
44
+ end
45
+ return info
46
+ end
41
47
  end
42
48
  info
43
49
  end
@@ -1,3 +1,3 @@
1
1
  module AppiumFailureHelper
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_failure_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Nascimento