This sample includes an APK file and a pre-written Appium test suite prepared for running in AppCenter/Test or testcloud.xamarin.com. Please see this document for information on preparing an existing Appium test suite for running in AppCenter: https://docs.microsoft.com/en-us/appcenter/test-cloud/preparing-for-upload/appium
If you haven't previously set up Appium, you can do so by following these steps:
-
Install
Node.js/NPM
: https://www.npmjs.com/get-npm -
Install Appium:
-
Windows This guide shows how to install Appium on Windows: https://www.edgewordstraining.co.uk/2017/07/05/install-appium-server-windows/
-
OSX Use this command in the Terminal (This may require additional permission arguments to work: npm/npm#17268):
sudo npm install -g appium
-
-
Install Maven: https://maven.apache.org/install.html
-
Set the ANDROID_HOME path enviroment variable. https://stackoverflow.com/questions/28296237/set-android-home-environment-variable-in-mac
By default typically the Android SDK is located at ~/Library/Android/sdk
(Mac) or %LOCALAPPDATA%\Android\sdk
(Windows)
(Note: The author of this sample used IntelliJ IDEA 2017.3.4 (Ultimate Edition) on Mac OS X 10.13.3, though other tools for building may work.)
- Provide the absolute path to swiftnote.apk here: Maven/src/test/java/com/microsoft/altframeworktraining/StartAppTest.java#L32
- Build the Maven project using your perferred method. Your IDE may prompt you to auto-apply some settings, in which case confirm them.
- Make sure to start the local Appium server before running tests, otherwise the tests will fail.
- Build the Maven project.
- Generate a command line for upload. Directions
- Run the upload command with project-specific arguments:
- OS X paste your command as the value for 'AppCenter_Test_Command' in 'upload.sh'. In terminal navigate to the Maven folder and run 'sh upload.sh' to generate the 'test/upload' folder and then upload to AppCenter/Test
- Windows The 'upload.sh' file is not technically compatible with Windows, however it shows how to modify the generated command to upload this sample manually.
See Also: upload.sh
org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
One way to reproduce this issue is if you have an invalid path to the APK as noted in Step #1 of the Building & Running locally directions. It is unknown if other causes may trigger this specific error message to appear.
Within this repo, the sourcecode for this app can be found in the Espresso/Swiftnotes folder. That folder also contains the LICENSE file for the sample.
Copyright © 2017 Adrian Chifor
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.