appium_flutter_finder 0.1.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: 9a617dc7948073da6703483d3489be7f487f30ed13593a427eb2592c05053a50
4
- data.tar.gz: d03cfa4714bd5d183dff0b11c5e051ed50525424357c109e3796eea7222b68f3
3
+ metadata.gz: b984346a462b9d110ac47d7180c4d7acf913ab828e88b436d02e633af493efbf
4
+ data.tar.gz: 518826877b83afeebf3862286b658fcccbb5141c5d63c8477189ed137c8d8cab
5
5
  SHA512:
6
- metadata.gz: 72dbe47b3b63cf3d4b62bd953fedd76718fbb9e4bdc92da38456038acbfafb1c7e6f021c6ab736cf63bd91e0ea3766abfb271a79cda44680d5e5e55eb6a4c04d
7
- data.tar.gz: b3ffa31ee92d7cad531b6645fe1f5d5a11157a36af7ca075553cf4c4e7a85bf66b38b93c58ea010030a56e5840dec535d06ac3a2fd002f9a146c2c6bd032e54e
6
+ metadata.gz: f115465181a10a7a5dc2b075fc7880ef1e6437c41db25cd62d8b6d850ea31545a5a2261205edd7def9b2c0e25026fee7a2b608a807ba87fd71b7581010694292
7
+ data.tar.gz: 70c32e67ac6c3397b2c9f7843f5cce2c71c96352235dcbb3fd4e95fcce8ca188531b129a9f2a5bcd9ca6c0ae083d62434c3cbab192783f1c70df6cc8274d0e06
data/README.md CHANGED
@@ -42,6 +42,15 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
42
42
 
43
43
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
44
 
45
+ ## Changelog
46
+ - 0.3
47
+ - Add `first_match_only` option in `by_ancestor` and `by_descendant`
48
+ - 0.2.1
49
+ - Fix `by_ancestor` and `by_descendant`
50
+ - https://github.com/truongsinh/appium-flutter-driver/pull/165#issuecomment-877928553
51
+ - 0.2.0
52
+ - Bump ruby_lib_core version to 4+
53
+
45
54
  ## Contributing
46
55
 
47
56
  Bug reports and pull requests are welcome on GitHub at https://github.com/truongsinh/appium-flutter-driver/tree/master/finder/ruby .
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'appium_flutter_finder/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = '>= 2.2'
6
+ spec.required_ruby_version = '>= 2.4'
7
7
 
8
8
  spec.name = 'appium_flutter_finder'
9
9
  spec.version = Appium::Flutter::Finder::VERSION
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_runtime_dependency 'appium_lib_core', '~> 3.3'
26
+ spec.add_runtime_dependency 'appium_lib_core', '~> 4.0'
27
27
 
28
- spec.add_development_dependency 'bundler', '~> 1.17'
28
+ spec.add_development_dependency 'bundler', '>= 1.17'
29
29
  spec.add_development_dependency 'minitest', '~> 5.0'
30
30
  spec.add_development_dependency 'rake', '~> 10.0'
31
31
  end
@@ -1,7 +1,7 @@
1
1
  module Appium
2
2
  module Flutter
3
3
  module Finder
4
- VERSION = '0.1.0'.freeze
4
+ VERSION = '0.3.0'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -10,14 +10,14 @@ module Appium
10
10
  # Handles flutter elements as Appium Elements
11
11
  class Element < ::Selenium::WebDriver::Element
12
12
  def initialize(driver, finder:)
13
- @bridge = driver.send :bridge
13
+ @bridge = driver.bridge
14
14
  @id = finder
15
15
  end
16
16
  end
17
17
 
18
18
  # Get find element context for flutter driver
19
19
  module Finder
20
- def by_ancestor(serialized_finder:, matching:, match_root: false)
20
+ def by_ancestor(serialized_finder:, matching:, match_root: false, first_match_only: false)
21
21
  by_ancestor_or_descendant(
22
22
  type: 'Ancestor',
23
23
  serialized_finder: serialized_finder,
@@ -26,7 +26,7 @@ module Appium
26
26
  )
27
27
  end
28
28
 
29
- def by_descendant(serialized_finder:, matching:, match_root: false)
29
+ def by_descendant(serialized_finder:, matching:, match_root: false, first_match_only: false)
30
30
  by_ancestor_or_descendant(
31
31
  type: 'Descendant',
32
32
  serialized_finder: serialized_finder,
@@ -85,8 +85,8 @@ module Appium
85
85
  Base64.strict_encode64(hash.to_json)
86
86
  end
87
87
 
88
- def by_ancestor_or_descendant(type:, serialized_finder:, matching:, match_root: false)
89
- param = { finderType: type, matchRoot: match_root }
88
+ def by_ancestor_or_descendant(type:, serialized_finder:, matching:, match_root: false, first_match_only: false)
89
+ param = { finderType: type, matchRoot: match_root, firstMatchOnly: first_match_only}
90
90
 
91
91
  finder = begin
92
92
  JSON.parse(Base64.decode64(serialized_finder))
@@ -94,18 +94,23 @@ module Appium
94
94
  {}
95
95
  end
96
96
 
97
+ of_param = {}
97
98
  finder.each_key do |key|
98
- param["of_#{key}"] = finder[key]
99
+ of_param[key] = finder[key]
99
100
  end
101
+ param['of'] = of_param.to_json
100
102
 
101
103
  matching = begin
102
104
  JSON.parse(Base64.decode64(matching))
103
105
  rescue JSONError
104
106
  {}
105
107
  end
108
+
109
+ matching_param = {}
106
110
  matching.each_key do |key|
107
- param["matching_#{key}"] = matching[key]
111
+ matching_param[key] = matching[key]
108
112
  end
113
+ param['matching'] = matching_param.to_json
109
114
 
110
115
  serialize param
111
116
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_flutter_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki Matsuo
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-29 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appium_lib_core
@@ -16,26 +16,26 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.3'
19
+ version: '4.0'
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: '3.3'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.17'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.17'
41
41
  - !ruby/object:Gem::Dependency
@@ -84,7 +84,7 @@ files:
84
84
  homepage: https://github.com/truongsinh/appium-flutter-driver
85
85
  licenses: []
86
86
  metadata: {}
87
- post_install_message:
87
+ post_install_message:
88
88
  rdoc_options: []
89
89
  require_paths:
90
90
  - lib
@@ -92,15 +92,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: '2.2'
95
+ version: '2.4'
96
96
  required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: '0'
101
101
  requirements: []
102
- rubygems_version: 3.0.3
103
- signing_key:
102
+ rubygems_version: 3.2.15
103
+ signing_key:
104
104
  specification_version: 4
105
105
  summary: Finder for appium-flutter-driver
106
106
  test_files: []