README.md in testcentricity_mobile-4.0.2 vs README.md in testcentricity_mobile-4.0.3
- old
+ new
@@ -6,11 +6,11 @@
![Maintained](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)
[![Docs](https://img.shields.io/badge/docs-rubydoc-blue.svg)](http://www.rubydoc.info/gems/testcentricity_mobile)
The TestCentricity™ Mobile core framework for native mobile iOS and Android app testing implements a Screen Object Model
-DSL for use with Cucumber (version 7.x or greater) and Appium. It also facilitates the configuration of the appropriate
+DSL for use with Cucumber (version 7.x or greater) and Appium 2.x. It also facilitates the configuration of the appropriate
Appium capabilities and driver required to establish a connection with locally or cloud hosted iOS and Android real devices
or simulators.
The TestCentricity™ Mobile gem supports automated testing of native iOS and Android apps running on the following mobile
test targets:
@@ -26,11 +26,20 @@
A complete history of bug fixes and new features can be found in the {file:CHANGELOG.md CHANGELOG} file.
The RubyDocs for this gem can be found [here](https://www.rubydoc.info/gems/testcentricity_mobile/).
+Two example projects that demonstrates the implementation of a screen object model framework using Cucumber and TestCentricity™
+Mobile can be found at the following:
+ * [tc_mobile_react_native_demo](https://github.com/TestCentricity/tc_mobile_react_native_demo)
+ * [tc_mobile_wdio_demo](https://github.com/TestCentricity/tc_mobile_wdio_demo)
+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 ability to interact with and
+verify iOS system level modal dialogs.
+
+
### Which gem should I use?
* The [TestCentricity **Mobile** gem](https://rubygems.org/gems/testcentricity_mobile) only supports testing of native iOS and Android mobile apps
* The [TestCentricity **Web** gem](https://rubygems.org/gems/testcentricity_web) only supports testing of web interfaces via desktop and mobile web browsers
* The TestCentricity gem supports testing of native mobile apps and/or web interfaces via desktop and mobile web browsers.
@@ -472,15 +481,24 @@
Single `AppUIElement` declarations have the following format:
elementType :elementName, { locator_strategy: locator_identifier }
* The `elementName` is the unique name that you will use to refer to the UI element and is specified as a `Symbol`.
-* The `locator_strategy` specifies the [selector strategy](https://appium.io/docs/en/commands/element/find-elements/index.html#selector-strategies)
-that Appium will use to find the `AppUIElement`. Valid selectors are `accessibility_id:`, `id:`, `name:`, `class:`, `xpath:`,
-`predicate:` (iOS only), `class_chain:` (iOS only), and `css:` (WebViews in hybrid apps only).
+* The `locator_strategy` specifies the selector strategy that Appium will use to find the `AppUIElement`. Valid selectors are:
+ - `accessibility_id:`
+ - `id:`
+ - `name:`
+ - `class:`
+ - `xpath:`
+ - `predicate:` (iOS only)
+ - `class_chain:` (iOS only)
+ - `css:` (WebViews in hybrid apps only).
* The `locator_identifier` is the value or attribute that uniquely and unambiguously identifies the `AppUIElement`.
+Refer to [this page](https://appium.github.io/appium-xcuitest-driver/5.12/locator-strategies/) for information on selector strategies for iOS.
+Refer to [this page](https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#element-location) for information on selector strategies for Android.
+
Multiple `AppUIElement` declarations for a collection of elements of the same type can be performed by passing a hash table
containing the names and locators of each individual element.
### Example AppUIElement Declarations
@@ -972,10 +990,14 @@
Refer to [this page](https://appium.io/docs/en/2.4/guides/caps/) for information regarding specifying Appium capabilities. The Appium server must be running prior
to invoking Cucumber to run your features/scenarios on locally hosted iOS or Android simulators or physical devices. Refer
to [**section 8.2.3 (Starting and Stopping Appium Server)**](#starting-and-stopping-appium-server) below.
+⚠️ If you are running locally hosted mobile tests on iOS or Android simulators or devices using version 1.x of the Appium
+server, the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server
+endpoint is used.
+
#### Connecting to Locally Hosted iOS Simulators or Physical Devices
You can run your automated tests on locally hosted iOS simulators or physically connected devices using Appium and XCode
on macOS. You must install Appium, XCode, and the iOS version-specific device simulators for XCode. Information about
Appium setup and configuration requirements with the XCUITest driver for testing on physically connected iOS devices can
@@ -1188,10 +1210,17 @@
This can be set by adding the following to your `cucumber.yml` file and including `-p run_appium` in your command line when
starting your Cucumber test suite(s):
run_appium: APPIUM_SERVER=run
+If you are running locally hosted mobile tests on iOS or Android simulators or devices using version 1.x of the Appium server,
+the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server endpoint
+is used. This can be set by adding the following to your `cucumber.yml` file and including `-p appium_1x` in your command line
+when starting your Cucumber test suite(s):
+
+ appium_1x: APPIUM_SERVER_VERSION=1
+
Refer to [**section 8.4 (Using Configuration Specific Profiles in `cucumber.yml`)**](#using-configuration-specific-profiles-in-cucumber-yml) below.
##### Using Appium Server with RSpec
@@ -1208,11 +1237,15 @@
after(:context) do
# terminate Appium Server after all of the examples in this group
$server.stop if Environ.driver == :appium && $server.running?
end
```
+If you are running locally hosted mobile tests on iOS or Android simulators or devices using version 1.x of the Appium server,
+the `APPIUM_SERVER_VERSION` environment variable must be set to `1` in order to ensure that the correct Appium server endpoint
+is used.
+
### Connecting to Remote Cloud Hosted iOS and Android Simulators or Physical Devices
You can run your automated tests against remote cloud hosted iOS and Android simulators and real devices using the BrowserStack,
SauceLabs, or TestingBot services.
@@ -1630,10 +1663,11 @@
#==============
# profile to start Appium Server prior to running locally hosted mobile app tests on iOS or Android simulators or
# physical devices
#==============
run_appium: APPIUM_SERVER=run
+ appium_1x: APPIUM_SERVER_VERSION=1
#==============
# profiles for native iOS apps hosted within XCode iOS simulators
# NOTE: Requires installation of XCode, iOS version specific target simulators, and Appium
@@ -1726,9 +1760,14 @@
NOTE: Appium must be running prior to executing this command
You can ensure that Appium Server is running by including `-p run_appium` in your command line:
cucumber -p ipad_pro_12_15_sim -p portrait -p run_appium
+
+If you are running locally hosted mobile tests using version 1.x of Appium server, you must include `-p appium_1x` in
+your command line:
+
+ cucumber -p ipad_pro_12_15_sim -p landscape -p run_appium -p appium_1x
The following command specifies that Cucumber will run tests against a cloud hosted iPhone 13 Pro Max running iOS 15.4 on the
BrowserStack service: