appium_capybara 2.0.1 → 2.1.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: 2c01c74dae5c0bee9ff0affce27ffb6d71229271a597468ae02cb2a2977925d7
4
- data.tar.gz: 9d30bfd646196682b2b4f4fe153ee2b1f58de02ede7f052615d3b63d3f2bdd97
3
+ metadata.gz: f8fa2974034da5a71b5dcd15ce959245daf7205d51024fda614bdaa7f0035754
4
+ data.tar.gz: b85a0c159a54944cbe0cc00d6a9f08ce3d669e60638343fe84dc70156ec1cb6b
5
5
  SHA512:
6
- metadata.gz: 7d320348656da67f051a6237c56383ec65d16a78e89b099177cfd6e66063ad92118d433abcca42fe97705536730d8691780f509665fb75248b13b2ce394381f6
7
- data.tar.gz: 982ff5267fd0c1def16dd311d11c89407bfe65f97d13ac5734324349c5fb13c6e65957547120e01123f08bfe0622acfb1410778409d9ec61870b0a55fc85e343
6
+ metadata.gz: 5f581e64407e72fabb037166a1d59b87ceb1025a012b8a05bf58975eacc407279f54fd9bc07edf8fdc1356bb0cffef19b23def7b7164351a6d9dfa223d518819
7
+ data.tar.gz: 87342612a1440d10b29b40030e71d317628b656ae0e0f22bce6396461f7f88bca76d14029e7fd3da6922df38ea93d16e040c5bc39f1e9abe4caaf9ee5e160c4e
@@ -0,0 +1,53 @@
1
+ name: Run example
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+
15
+ runs-on: macos-11
16
+ env:
17
+ PLATFORM_VERSION: '15.2'
18
+ XCODE_VERSION: '13.2'
19
+
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ - uses: maxim-lobanov/setup-xcode@v1
23
+ with:
24
+ xcode-version: ${{ env.XCODE_VERSION }}
25
+ - run: xcrun simctl list
26
+ - name: Set up Appium env
27
+ uses: actions/setup-node@v3
28
+ with:
29
+ node-version: 16
30
+ check-latest: true
31
+ - name: Install Appium XCUITest
32
+ run: |
33
+ npm install -g appium@next
34
+ appium driver install xcuitest
35
+ - name: run Appium background
36
+ run: |
37
+ nohup appium --base-path=/wd/hub --log-timestamp --log-no-colors > appium.out 2>&1 &
38
+ - name: Set up Ruby
39
+ uses: ruby/setup-ruby@0a29871fe2b0200a17a4497bae54fe5df0d973aa # v1.115.3
40
+ with:
41
+ ruby-version: 3.1
42
+ bundler-cache: true
43
+ - name: Run example
44
+ run: |
45
+ cd example
46
+ bundle install
47
+ bundle exec rspec spec/ios_example_spec.rb
48
+ - name: Upload appium.out
49
+ uses: actions/upload-artifact@v3.1.1
50
+ if: failure()
51
+ with:
52
+ path: appium.out
53
+
@@ -7,7 +7,7 @@ class Gem::Specification
7
7
  end
8
8
 
9
9
  Gem::Specification.new do |s|
10
- s.required_ruby_version = '>= 2.6'
10
+ s.required_ruby_version = '>= 2.7'
11
11
 
12
12
  s.name = 'appium_capybara'
13
13
  s.version = Appium::Capybara::VERSION
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.license = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
16
16
  s.description = s.summary = 'Enables appium support in Capybara'
17
17
  s.description += '.' # avoid identical warning
18
- s.authors = s.email = ['scott.bonebrake@gmail.com', 'code@bootstraponline.com', 'jason.s.carr@gmail.com']
18
+ s.authors = s.email = ['fly.49.89.over@gmail.com']
19
19
  s.homepage = 'https://github.com/appium/appium_capybara'
20
20
  s.require_paths = ['lib']
21
21
 
@@ -24,6 +24,5 @@ Gem::Specification.new do |s|
24
24
 
25
25
  s.add_development_dependency 'appium_thor', '~> 1.1.6'
26
26
 
27
-
28
27
  s.files = s.remove_zip_files(`git ls-files`.split("\n"))
29
28
  end
data/example/readme.md CHANGED
@@ -6,16 +6,30 @@ bundle update
6
6
  bundle exec rspec spec/ios_example_spec.rb
7
7
  ```
8
8
 
9
- # Use with pry
9
+ # Use `irb` or `pry`
10
+
11
+ You may need to add `pry` in Gemfile to use `pry` under `bundle`, otherwise you can insert `binding.irb` or `binding.pry` in the example code if needed.
12
+
13
+ ```bash
14
+ $ bndle exec irb
15
+ ```
10
16
 
11
17
  ```ruby
12
- # start a Pry session and paste the following code
18
+ # start an irb or pry session and paste the following code
13
19
  # run from the example folder
14
20
  require 'appium_capybara'
15
21
 
16
22
  Capybara.register_driver(:appium) do |app|
17
- opts = Appium.load_appium_txt file: File.join(Dir.pwd, 'appium.txt')
18
- Appium::Capybara::Driver.new app, opts
23
+ Appium::Capybara::Driver.new app, capabilities: {
24
+ 'platformName' => 'ios',
25
+ 'platformVersion' => ENV['PLATFORM_VERSION'] || '16.0',
26
+ 'appium:deviceName' => 'iPhone 12',
27
+ 'appium:automationName' => 'xcuitest',
28
+ 'appium:app' => File.expand_path('UICatalog.app.zip'),
29
+ 'appium:wdaLaunchTimeout' => 600000,
30
+ },
31
+ appium_lib: { server_url: 'http://localhost:4723/wd/hub' },
32
+ global_driver: false
19
33
  end
20
34
 
21
35
  Capybara.default_driver = :appium
@@ -26,4 +40,4 @@ capy_driver.browser
26
40
  # now driver commands can be invoked
27
41
  > capy_driver.go_back
28
42
  post /back
29
- ```
43
+ ```
@@ -4,15 +4,17 @@ require 'capybara/rspec'
4
4
  require 'appium_capybara'
5
5
  require 'site_prism'
6
6
 
7
- caps = Appium.load_appium_txt file: File.expand_path('./', 'appium.txt'), verbose: true
8
-
9
- url = 'http://localhost:4723/wd/hub'.freeze
10
-
11
7
  Capybara.register_driver(:appium) do |app|
12
- all_options = caps.merge(appium_lib: { server_url: url }, global_driver: false)
13
- puts all_options.inspect
14
-
15
- Appium::Capybara::Driver.new app, **all_options
8
+ Appium::Capybara::Driver.new app, capabilities: {
9
+ 'platformName' => 'ios',
10
+ 'platformVersion' => ENV['PLATFORM_VERSION'] || '16.0',
11
+ 'appium:deviceName' => 'iPhone 12',
12
+ 'appium:automationName' => 'xcuitest',
13
+ 'appium:app' => File.expand_path('UICatalog.app.zip'),
14
+ 'appium:wdaLaunchTimeout' => 600000,
15
+ },
16
+ appium_lib: { server_url: 'http://localhost:4723/wd/hub' },
17
+ global_driver: false
16
18
  end
17
19
 
18
20
  Capybara.default_driver = :appium
@@ -1,10 +1,6 @@
1
1
  class Capybara::Node::Element
2
2
  # Override
3
3
  def inspect
4
- %(#<#{self.class} tag="#{tag_name}" path="#{path}">)
5
- rescue ::Capybara::NotSupportedByDriverError, ::Selenium::WebDriver::Error::WebDriverError
6
- # Native context does not have the 'path' strategy, so it could raise an exception.
7
- # Then, the method can call tag_name instead.
8
- %(#<#{self.class} tag="#{tag_name}">)
4
+ %(#<Capybara::Node::Element name=#{@base.name}>)
9
5
  end
10
6
  end
@@ -1,6 +1,6 @@
1
1
  module Appium
2
2
  module Capybara
3
- VERSION = '2.0.1'.freeze unless defined? ::Appium::Capybara::VERSION
4
- DATE = '2022-11-12'.freeze unless defined? ::Appium::Capybara::DATE
3
+ VERSION = '2.1.0'.freeze unless defined? ::Appium::Capybara::VERSION
4
+ DATE = '2022-11-13'.freeze unless defined? ::Appium::Capybara::DATE
5
5
  end
6
6
  end
data/release_notes.md CHANGED
@@ -1,3 +1,18 @@
1
+ #### v2.1.0 2022-11-13
2
+
3
+ - [2c5362f](https://github.com/appium/appium_capybara/commit/2c5362f95bdb71af717d1ffeb89841bfa7775ef2) Release 2.1.0
4
+ - [b200990](https://github.com/appium/appium_capybara/commit/b2009905b0901b081a453a31151a1b4929d692f2) chore: fix required ruby version to match with the base appium_lib (#71)
5
+
6
+
7
+ #### v2.0.2 2022-11-13
8
+
9
+ - [1145db9](https://github.com/appium/appium_capybara/commit/1145db93010c2cfbcf3a14faeb3dfac03a058e4a) Release 2.0.2
10
+ - [0058aa4](https://github.com/appium/appium_capybara/commit/0058aa4d4efec6e60d45d32e2963b0a7f6fdeccd) chore: remove appium.txt (#70)
11
+ - [07b9ef1](https://github.com/appium/appium_capybara/commit/07b9ef109728efb5d173e3d6b47353eba53306e6) Revert "fix: add webdrivererror handler instead of calling just name (#66)" (#69)
12
+ - [df9fef9](https://github.com/appium/appium_capybara/commit/df9fef9cb2bf081f789945120c81f9c554d3dbd5) ci: fix bundle command (#67)
13
+ - [47e5734](https://github.com/appium/appium_capybara/commit/47e5734815a8aa9ff715cd60c2fa2d5f61357426) ci: run example scenario as a quick test
14
+
15
+
1
16
  #### v2.0.1 2022-11-12
2
17
 
3
18
  - [5704c96](https://github.com/appium/appium_capybara/commit/5704c968c4f205898020d4496f65e971ac808c11) Release 2.0.1
metadata CHANGED
@@ -1,16 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
- - scott.bonebrake@gmail.com
8
- - code@bootstraponline.com
9
- - jason.s.carr@gmail.com
7
+ - fly.49.89.over@gmail.com
10
8
  autorequire:
11
9
  bindir: bin
12
10
  cert_chain: []
13
- date: 2022-11-12 00:00:00.000000000 Z
11
+ date: 2022-11-13 00:00:00.000000000 Z
14
12
  dependencies:
15
13
  - !ruby/object:Gem::Dependency
16
14
  name: appium_lib
@@ -56,13 +54,12 @@ dependencies:
56
54
  version: 1.1.6
57
55
  description: Enables appium support in Capybara.
58
56
  email:
59
- - scott.bonebrake@gmail.com
60
- - code@bootstraponline.com
61
- - jason.s.carr@gmail.com
57
+ - fly.49.89.over@gmail.com
62
58
  executables: []
63
59
  extensions: []
64
60
  extra_rdoc_files: []
65
61
  files:
62
+ - ".github/workflows/run_example.yml"
66
63
  - ".gitignore"
67
64
  - Gemfile
68
65
  - LICENSE-2.0.txt
@@ -71,7 +68,6 @@ files:
71
68
  - appium_capybara.gemspec
72
69
  - contributing.md
73
70
  - example/Gemfile
74
- - example/appium.txt
75
71
  - example/readme.md
76
72
  - example/spec/capybara_init.rb
77
73
  - example/spec/home_page.rb
@@ -99,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
95
  requirements:
100
96
  - - ">="
101
97
  - !ruby/object:Gem::Version
102
- version: '2.6'
98
+ version: '2.7'
103
99
  required_rubygems_version: !ruby/object:Gem::Requirement
104
100
  requirements:
105
101
  - - ">="
data/example/appium.txt DELETED
@@ -1,6 +0,0 @@
1
- [caps]
2
- platformName = "ios"
3
- platformVersion = "15.0"
4
- deviceName ="iPhone Simulator"
5
- automationName = 'XCUITest'
6
- app = "./UICatalog.app.zip"