testcentricity_mobile 4.0.2 → 4.0.4

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: 7b1da49ff47653a52199d5b9f72191dd4c23a109325daee033af966272f5086c
4
- data.tar.gz: d76708fc1c3384a5b7d98f7212212a3a2892fe112f50ac24343b58e763643ee4
3
+ metadata.gz: 0d519bfbcede39eaa26f5747d6cd80775251647b0eef46b2d5d67f132ba0cd9f
4
+ data.tar.gz: 61481d8001fcc958284084910bae13dd83c14d39bedd85d8f055c8cbadecae43
5
5
  SHA512:
6
- metadata.gz: 2270f5e563176336d880a745c89a698bef717a44185fbe042066b2d463fa265dd6f567465049868eb9d2489062909716b2dffe41a7aff44c312142e3cd53c3b4
7
- data.tar.gz: 9069b335fe5928aa03f3ed17e3aa803dd2b65dec9e0756dfa870bccf7ba090f67213581580119ca050a666666f74f1c32a5e22d11b553dd9e01a5e7cda2075a9
6
+ metadata.gz: 39be2d0fc4c2c384e0ceeaec2325af29b90c53e95a55aa70283582931ce68f632fc6e23e02c030b423514b2ed67ceae1989eb6470a3a3c9f79c4f37da7615d8b
7
+ data.tar.gz: 15606b7ae0548b6bce2339fdf457cd62ab8288082781eb7199b802e9557b968a0192c1ce88840c455df627a8ee1d6df3b74e9a8fb1dfd7d0313b9d8d2fba291a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
4
 
5
+ ## [4.0.4] - 26-APR-2024
6
+
7
+ ### Changed
8
+
9
+ * Updated `selenium-webdriver` gem to version 4.20.0.
10
+ * Updated `appium_lib` gem to version 15.0.0.
11
+ * Updated `appium_lib_core` gem to version 8.0.1.
12
+ * No longer using deprecated Appium `driver.keyboard_shown?` method.
13
+
14
+
15
+ ## [4.0.3] - 05-APR-2024
16
+
17
+ ### Fixed
18
+
19
+ * `AppiumConnect.initialize_appium`, `AppiumServer.start`, and `AppiumServer.running?` methods now support Appium version 2.x.
20
+ Backward compatibility with Appium version 1.x is provided if `APPIUM_SERVER_VERSION` Environment Variable is set to `1`.
21
+
22
+
5
23
  ## [4.0.2] - 27-MAR-2024
6
24
 
7
25
  ### Changed
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
  The TestCentricity™ Mobile core framework for native mobile iOS and Android app testing implements a Screen Object Model
11
- DSL for use with Cucumber (version 7.x or greater) and Appium. It also facilitates the configuration of the appropriate
11
+ DSL for use with Cucumber (version 7.x or greater) and Appium 2.x. It also facilitates the configuration of the appropriate
12
12
  Appium capabilities and driver required to establish a connection with locally or cloud hosted iOS and Android real devices
13
13
  or simulators.
14
14
 
@@ -28,18 +28,28 @@ A complete history of bug fixes and new features can be found in the {file:CHANG
28
28
 
29
29
  The RubyDocs for this gem can be found [here](https://www.rubydoc.info/gems/testcentricity_mobile/).
30
30
 
31
+ Two example projects that demonstrates the implementation of a screen object model framework using Cucumber and TestCentricity™
32
+ Mobile can be found at the following:
33
+ * [tc_mobile_react_native_demo](https://github.com/TestCentricity/tc_mobile_react_native_demo)
34
+ * [tc_mobile_wdio_demo](https://github.com/TestCentricity/tc_mobile_wdio_demo)
35
+
36
+ Refer to [this wiki page](https://github.com/TestCentricity/testcentricity_mobile/wiki/XCUItest-driver-bug-impacts-iOS-dialogs-managed-by-com.apple.springboard) for information on a bug with the latest versions of the XCUItest driver that affects Appium's
37
+ ability to interact with and verify iOS system level modal dialogs.
38
+
31
39
 
32
40
  ### Which gem should I use?
33
41
 
34
42
  * The [TestCentricity **Mobile** gem](https://rubygems.org/gems/testcentricity_mobile) only supports testing of native iOS and Android mobile apps
43
+ * The [TestCentricity **Apps** gem](https://rubygems.org/gems/testcentricity_apps) only supports testing of MacOS desktop apps and native iOS and Android mobile apps
35
44
  * The [TestCentricity **Web** gem](https://rubygems.org/gems/testcentricity_web) only supports testing of web interfaces via desktop and mobile web browsers
36
45
  * The TestCentricity gem supports testing of native mobile apps and/or web interfaces via desktop and mobile web browsers.
37
46
 
38
- | Tested platforms | TestCentricity Mobile | TestCentricity Web | TestCentricity |
39
- |----------------------------------------------------|-----------------------|--------------------|----------------|
40
- | Native mobile iOS and/or Android apps only | Yes | No | No |
41
- | Desktop/mobile web browsers only | No | Yes | No |
42
- | Native mobile apps and desktop/mobile web browsers | No | No | Yes |
47
+ | Tested platforms | TestCentricity Mobile | TestCentricity Apps | TestCentricity Web | TestCentricity |
48
+ |----------------------------------------------------|-----------------------|---------------------|--------------------|----------------|
49
+ | Native mobile iOS and/or Android apps only | Yes | Yes | No | No |
50
+ | MacOS desktop apps | No | Yes | No | No |
51
+ | Desktop/mobile web browsers only | No | No | Yes | No |
52
+ | Native mobile apps and desktop/mobile web browsers | No | No | No | Yes |
43
53
 
44
54
 
45
55
  ## Installation
@@ -474,11 +484,20 @@ Single `AppUIElement` declarations have the following format:
474
484
  elementType :elementName, { locator_strategy: locator_identifier }
475
485
 
476
486
  * The `elementName` is the unique name that you will use to refer to the UI element and is specified as a `Symbol`.
477
- * The `locator_strategy` specifies the [selector strategy](https://appium.io/docs/en/commands/element/find-elements/index.html#selector-strategies)
478
- that Appium will use to find the `AppUIElement`. Valid selectors are `accessibility_id:`, `id:`, `name:`, `class:`, `xpath:`,
479
- `predicate:` (iOS only), `class_chain:` (iOS only), and `css:` (WebViews in hybrid apps only).
487
+ * The `locator_strategy` specifies the selector strategy that Appium will use to find the `AppUIElement`. Valid selectors are:
488
+ - `accessibility_id:`
489
+ - `id:`
490
+ - `name:`
491
+ - `class:`
492
+ - `xpath:`
493
+ - `predicate:` (iOS only)
494
+ - `class_chain:` (iOS only)
495
+ - `css:` (WebViews in hybrid apps only).
480
496
  * The `locator_identifier` is the value or attribute that uniquely and unambiguously identifies the `AppUIElement`.
481
497
 
498
+ Refer to [this page](https://appium.github.io/appium-xcuitest-driver/5.12/locator-strategies/) for information on selector strategies for iOS.
499
+ Refer to [this page](https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#element-location) for information on selector strategies for Android.
500
+
482
501
  Multiple `AppUIElement` declarations for a collection of elements of the same type can be performed by passing a hash table
483
502
  containing the names and locators of each individual element.
484
503
 
@@ -974,6 +993,10 @@ Refer to [this page](https://appium.io/docs/en/2.4/guides/caps/) for information
974
993
  to invoking Cucumber to run your features/scenarios on locally hosted iOS or Android simulators or physical devices. Refer
975
994
  to [**section 8.2.3 (Starting and Stopping Appium Server)**](#starting-and-stopping-appium-server) below.
976
995
 
996
+ ⚠️ If you are running locally hosted mobile tests on iOS or Android simulators or devices using version 1.x of the Appium
997
+ server, the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server
998
+ endpoint is used.
999
+
977
1000
  #### Connecting to Locally Hosted iOS Simulators or Physical Devices
978
1001
 
979
1002
  You can run your automated tests on locally hosted iOS simulators or physically connected devices using Appium and XCode
@@ -1190,6 +1213,13 @@ starting your Cucumber test suite(s):
1190
1213
 
1191
1214
  run_appium: APPIUM_SERVER=run
1192
1215
 
1216
+ If you are running locally hosted mobile tests on iOS or Android simulators or devices using version 1.x of the Appium server,
1217
+ the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server endpoint
1218
+ is used. This can be set by adding the following to your `cucumber.yml` file and including `-p appium_1x` in your command line
1219
+ when starting your Cucumber test suite(s):
1220
+
1221
+ appium_1x: APPIUM_SERVER_VERSION=1
1222
+
1193
1223
  Refer to [**section 8.4 (Using Configuration Specific Profiles in `cucumber.yml`)**](#using-configuration-specific-profiles-in-cucumber-yml) below.
1194
1224
 
1195
1225
 
@@ -1210,6 +1240,10 @@ body of an example group:
1210
1240
  $server.stop if Environ.driver == :appium && $server.running?
1211
1241
  end
1212
1242
  ```
1243
+ If you are running locally hosted mobile tests on iOS or Android simulators or devices using version 1.x of the Appium server,
1244
+ the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server endpoint
1245
+ is used.
1246
+
1213
1247
 
1214
1248
  ### Connecting to Remote Cloud Hosted iOS and Android Simulators or Physical Devices
1215
1249
 
@@ -1632,6 +1666,7 @@ with access to your version control system.
1632
1666
  # physical devices
1633
1667
  #==============
1634
1668
  run_appium: APPIUM_SERVER=run
1669
+ appium_1x: APPIUM_SERVER_VERSION=1
1635
1670
 
1636
1671
 
1637
1672
  #==============
@@ -1729,6 +1764,11 @@ You can ensure that Appium Server is running by including `-p run_appium` in you
1729
1764
 
1730
1765
  cucumber -p ipad_pro_12_15_sim -p portrait -p run_appium
1731
1766
 
1767
+ If you are running locally hosted mobile tests using version 1.x of Appium server, you must include `-p appium_1x` in
1768
+ your command line:
1769
+
1770
+ cucumber -p ipad_pro_12_15_sim -p landscape -p run_appium -p appium_1x
1771
+
1732
1772
 
1733
1773
  The following command specifies that Cucumber will run tests against a cloud hosted iPhone 13 Pro Max running iOS 15.4 on the
1734
1774
  BrowserStack service:
@@ -214,7 +214,7 @@ module TestCentricity
214
214
  # @return [Boolean] TRUE if keyboard is shown. Return false if keyboard is hidden.
215
215
  #
216
216
  def self.keyboard_shown?
217
- driver.driver.keyboard_shown?
217
+ @driver.execute_script('mobile: isKeyboardShown')
218
218
  end
219
219
 
220
220
  # Get the current screen orientation
@@ -390,7 +390,13 @@ module TestCentricity
390
390
 
391
391
  def self.appium_local_capabilities
392
392
  # specify endpoint url
393
- @endpoint = 'http://127.0.0.1:4723/wd/hub' if @endpoint.nil?
393
+ if @endpoint.nil?
394
+ @endpoint = if ENV['APPIUM_SERVER_VERSION'] && ENV['APPIUM_SERVER_VERSION'].to_i == 1
395
+ 'http://127.0.0.1:4723/wd/hub'
396
+ else
397
+ 'http://127.0.0.1:4723'
398
+ end
399
+ end
394
400
  # define local Appium capabilities
395
401
  if @capabilities.nil?
396
402
  Environ.device_name = ENV['APP_DEVICE']
@@ -459,11 +465,7 @@ module TestCentricity
459
465
  Environ.device_name = @capabilities[:'appium:deviceName']
460
466
  Environ.device_os_version = @capabilities[:'appium:platformVersion']
461
467
  Environ.device_orientation = @capabilities[:'appium:orientation']
462
- Environ.device = if @capabilities[:'appium:udid']
463
- :device
464
- else
465
- :simulator
466
- end
468
+ Environ.device = @capabilities[:'appium:udid'] ? :device : :simulator
467
469
  @capabilities
468
470
  end
469
471
  end
@@ -125,7 +125,8 @@ module TestCentricity
125
125
  ui_object.count
126
126
  when :buttons
127
127
  ui_object.buttons
128
-
128
+ else
129
+ raise "#{property} is not a valid property"
129
130
  end
130
131
  error_msg = "Expected UI object '#{ui_object.get_name}' (#{ui_object.get_locator}) #{property} property to"
131
132
  ExceptionQueue.enqueue_comparison(ui_object, state, actual, error_msg)
@@ -38,9 +38,14 @@ module TestCentricity
38
38
  # Check to see if Appium Server is running
39
39
  #
40
40
  def running?
41
+ endpoint = if ENV['APPIUM_SERVER_VERSION'] && ENV['APPIUM_SERVER_VERSION'].to_i == 1
42
+ 'http://0.0.0.0:4723/wd/hub/sessions'
43
+ else
44
+ 'http://0.0.0.0:4723/sessions'
45
+ end
41
46
  response = false
42
47
  begin
43
- response = Net::HTTP.get_response(URI('http://0.0.0.0:4723/wd/hub/sessions'))
48
+ response = Net::HTTP.get_response(URI(endpoint))
44
49
  rescue
45
50
  end
46
51
  response && response.code_type == Net::HTTPOK
@@ -1,3 +1,3 @@
1
1
  module TestCentricityMobile
2
- VERSION = '4.0.2'
2
+ VERSION = '4.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_mobile
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-27 00:00:00.000000000 Z
11
+ date: 2024-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 9.1.2
33
+ version: 9.2.0
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
- version: 9.1.2
40
+ version: 9.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: parallel_tests
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 14.0.0
131
+ version: 15.0.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 14.0.0
138
+ version: 15.0.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: childprocess
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - '='
214
214
  - !ruby/object:Gem::Version
215
- version: 4.19.0
215
+ version: 4.20.0
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - '='
221
221
  - !ruby/object:Gem::Version
222
- version: 4.19.0
222
+ version: 4.20.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: test-unit
225
225
  requirement: !ruby/object:Gem::Requirement