appium_capybara 2.0.0 → 2.0.2
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 +4 -4
- data/.github/workflows/run_example.yml +53 -0
- data/example/readme.md +20 -6
- data/example/spec/capybara_init.rb +10 -8
- data/example/spec/home_page.rb +2 -0
- data/example/spec/ios_example_spec.rb +3 -0
- data/example/spec/sheets_section.rb +5 -0
- data/example/spec/spec_helper.rb +2 -0
- data/lib/appium_capybara/ext/element_ext.rb +6 -0
- data/lib/appium_capybara/version.rb +2 -2
- data/lib/appium_capybara.rb +1 -0
- data/release_notes.md +26 -0
- metadata +6 -4
- data/example/appium.txt +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61255547032b2929a417bce0dd2cd32d1b1f14cac5e1f541ff3f2e4af4936bd0
|
4
|
+
data.tar.gz: 4c9bbbb7797a46b2f2beee958eeb2eeb092f2ada2b83b6fd3a77218f02aa816b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df111f9390b02d9a8b0f73b03c5c08ea8b06faa5fa7a4b28b51422f2bdb1f0f420a46e964fe680ca83d10a7b4d46116615c27c4cbced1fbb72620425ea75b47a
|
7
|
+
data.tar.gz: 268d230df4a4fa564a10b0171810563d2dd091f7cbe810d234f99f548a18e18a07f1d872570c46a8a1992f20302e62122b23a98ca4fd5dd3811d34bb1e9cf782
|
@@ -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
|
+
|
data/example/readme.md
CHANGED
@@ -3,19 +3,33 @@
|
|
3
3
|
```
|
4
4
|
cd example
|
5
5
|
bundle update
|
6
|
-
rspec
|
6
|
+
bundle exec rspec spec/ios_example_spec.rb
|
7
7
|
```
|
8
8
|
|
9
|
-
# Use
|
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
|
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
|
-
|
18
|
-
|
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
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
data/example/spec/home_page.rb
CHANGED
@@ -5,6 +5,9 @@ describe 'UICatalog smoke test' do
|
|
5
5
|
home_page = Pages::Home.new
|
6
6
|
expect(home_page.navigation_bar.first).to be_truthy
|
7
7
|
|
8
|
+
# Use Capybara::Node::Element element
|
9
|
+
expect(home_page.action_sheets_section.has_buttons?).to be_falsey
|
10
|
+
|
8
11
|
expect(Capybara.current_driver).to be :appium
|
9
12
|
|
10
13
|
capy_driver = Capybara.current_session.driver
|
data/example/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Appium
|
2
2
|
module Capybara
|
3
|
-
VERSION = '2.0.
|
4
|
-
DATE = '
|
3
|
+
VERSION = '2.0.2'.freeze unless defined? ::Appium::Capybara::VERSION
|
4
|
+
DATE = '2022-11-13'.freeze unless defined? ::Appium::Capybara::DATE
|
5
5
|
end
|
6
6
|
end
|
data/lib/appium_capybara.rb
CHANGED
@@ -4,6 +4,7 @@ require_relative 'appium_capybara/driver/appium/driver'
|
|
4
4
|
require_relative 'appium_capybara/driver/appium/node'
|
5
5
|
|
6
6
|
require_relative 'appium_capybara/ext/base_ext'
|
7
|
+
require_relative 'appium_capybara/ext/element_ext'
|
7
8
|
require_relative 'appium_capybara/ext/selector_query_ext'
|
8
9
|
require_relative 'appium_capybara/ext/selector_ext'
|
9
10
|
|
data/release_notes.md
CHANGED
@@ -1,3 +1,29 @@
|
|
1
|
+
#### v2.0.2 2022-11-13
|
2
|
+
|
3
|
+
- [1145db9](https://github.com/appium/appium_capybara/commit/1145db93010c2cfbcf3a14faeb3dfac03a058e4a) Release 2.0.2
|
4
|
+
- [0058aa4](https://github.com/appium/appium_capybara/commit/0058aa4d4efec6e60d45d32e2963b0a7f6fdeccd) chore: remove appium.txt (#70)
|
5
|
+
- [07b9ef1](https://github.com/appium/appium_capybara/commit/07b9ef109728efb5d173e3d6b47353eba53306e6) Revert "fix: add webdrivererror handler instead of calling just name (#66)" (#69)
|
6
|
+
- [df9fef9](https://github.com/appium/appium_capybara/commit/df9fef9cb2bf081f789945120c81f9c554d3dbd5) ci: fix bundle command (#67)
|
7
|
+
- [47e5734](https://github.com/appium/appium_capybara/commit/47e5734815a8aa9ff715cd60c2fa2d5f61357426) ci: run example scenario as a quick test
|
8
|
+
|
9
|
+
|
10
|
+
#### v2.0.1 2022-11-12
|
11
|
+
|
12
|
+
- [5704c96](https://github.com/appium/appium_capybara/commit/5704c968c4f205898020d4496f65e971ac808c11) Release 2.0.1
|
13
|
+
- [4072558](https://github.com/appium/appium_capybara/commit/4072558be376c69cb4e7b84e21967c0957403a56) fix: add webdrivererror handler instead of calling just name (#66)
|
14
|
+
- [37f10b8](https://github.com/appium/appium_capybara/commit/37f10b8da484625de9d4c0377dd503eae13e89bd) update release_notes (#64)
|
15
|
+
- [7303687](https://github.com/appium/appium_capybara/commit/7303687fd93b109f112e1ac4bcd37cdcacb8be30) fix Capybara::Node::Element.inspect (#62)
|
16
|
+
|
17
|
+
|
18
|
+
#### v2.0.0 2021-11-11
|
19
|
+
|
20
|
+
- [503a8d5](https://github.com/appium/appium_capybara/commit/503a8d5bfbc058257a4352fb68a841b1c4628f62) chore: bump version
|
21
|
+
- [2db4ab7](https://github.com/appium/appium_capybara/commit/2db4ab76b1af74cfa9967ec218aac3b627f0f4e2) chore: tweak appium_lib version
|
22
|
+
- [2569793](https://github.com/appium/appium_capybara/commit/2569793b713eeeb8a677bdd8269c26dd3cb0bc5c) chore: bump version to rc2
|
23
|
+
- [90b5b57](https://github.com/appium/appium_capybara/commit/90b5b57139ce60c7971b285019a3b26aa5f70547) chore: bump appium_lib to rc5
|
24
|
+
- [0d30dde](https://github.com/appium/appium_capybara/commit/0d30dde8a8548f7c933270958b5cf3ca5978ba6a) chore: bump base ruby_lib ver to 12 rc, bump version (#60)
|
25
|
+
|
26
|
+
|
1
27
|
#### v1.10.0 2019-11-23
|
2
28
|
|
3
29
|
- [2a0a739](https://github.com/appium/appium_capybara/commit/2a0a739685b571ab8d54655f924ed078c45d3bbe) Release 1.10.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- scott.bonebrake@gmail.com
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2022-11-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: appium_lib
|
@@ -63,6 +63,7 @@ executables: []
|
|
63
63
|
extensions: []
|
64
64
|
extra_rdoc_files: []
|
65
65
|
files:
|
66
|
+
- ".github/workflows/run_example.yml"
|
66
67
|
- ".gitignore"
|
67
68
|
- Gemfile
|
68
69
|
- LICENSE-2.0.txt
|
@@ -71,16 +72,17 @@ files:
|
|
71
72
|
- appium_capybara.gemspec
|
72
73
|
- contributing.md
|
73
74
|
- example/Gemfile
|
74
|
-
- example/appium.txt
|
75
75
|
- example/readme.md
|
76
76
|
- example/spec/capybara_init.rb
|
77
77
|
- example/spec/home_page.rb
|
78
78
|
- example/spec/ios_example_spec.rb
|
79
|
+
- example/spec/sheets_section.rb
|
79
80
|
- example/spec/spec_helper.rb
|
80
81
|
- lib/appium_capybara.rb
|
81
82
|
- lib/appium_capybara/driver/appium/driver.rb
|
82
83
|
- lib/appium_capybara/driver/appium/node.rb
|
83
84
|
- lib/appium_capybara/ext/base_ext.rb
|
85
|
+
- lib/appium_capybara/ext/element_ext.rb
|
84
86
|
- lib/appium_capybara/ext/selector_ext.rb
|
85
87
|
- lib/appium_capybara/ext/selector_query_ext.rb
|
86
88
|
- lib/appium_capybara/version.rb
|
@@ -104,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
106
|
- !ruby/object:Gem::Version
|
105
107
|
version: '0'
|
106
108
|
requirements: []
|
107
|
-
rubygems_version: 3.
|
109
|
+
rubygems_version: 3.3.3
|
108
110
|
signing_key:
|
109
111
|
specification_version: 4
|
110
112
|
summary: Enables appium support in Capybara
|