-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
42 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,56 @@ | ||
# Mobile Automation Framework for Android | ||
# ANDROID AUTOMATION WITH APPIUM | ||
|
||
## Getting started | ||
|
||
This is an upgrade version of the code that will be compatible with Appium v2. Also works | ||
with appium v1. | ||
This guide will show how to use the automation scripts written in Java using Appium. | ||
The basics configuration needed as well as common tools that need to be modified in | ||
order to do a proper setup. | ||
|
||
### ==================================================== | ||
|
||
#### REQUIREMENTS | ||
#### SETUP REQUIREMENTS | ||
Appium server installation v1: | ||
- brew install node | ||
- npm install -g appium | ||
- npm install wd | ||
- appium & | ||
|
||
FOR MACOS | ||
|
||
_**NOTE**: Homebrew must be set previously. If is not, follow this link for instructions: | ||
[Homebrew Setup](https://docs.brew.sh/Installation)_ | ||
* brew install node | ||
* npm install -g appium | ||
* npm install wd | ||
* appium & | ||
|
||
The needed dependencies are located in the ```pom.xml``` file. | ||
To take in consideration: | ||
1. TestNG v7.5 still works with Java v8. A newer version requires Java v11. | ||
1. TestNG v7.5 still works with Java v8, newer versions require Java v11 or above. | ||
2. Selenium v4.8.1 still works with Java v8. Newer version are backward compatible. | ||
3. For more info check this link [Java Client migration from 7 to 8](https://github.com/appium/java-client/blob/master/docs/v7-to-v8-migration-guide.md) | ||
3. For more info check this link [Java Client migration from 7 to 8](https://github.com/appium/java-client/blob/master/docs/v7-to-v8-migration-guide.md). | ||
4. This works with IntelliJ IDE as default. If another is used like Eclipse or VSCode, an effort research is required. | ||
|
||
#### HOW TO EXECUTE THE CODE? | ||
|
||
* Launch IntelliJ IDE | ||
* Open the project | ||
* Look for ```pom.xml``` file, right click then click "Reload project" | ||
* Once is finished, look in "test>java>configMaps.xml" file | ||
* Modify the section ```<!-- Mobile Main Config Parameters -->``` with your devices | ||
``` | ||
<parameter name="platformVersion" value="ANDROID_VERSION"/> | ||
<parameter name="deviceName" value="DEVICE_ID"/> | ||
``` | ||
* Save the file | ||
* Right click then click "Run '.../src/test/'configMaps.xml'" | ||
|
||
|
||
#### ADDITIONAL NOTES | ||
|
||
To execute the code, this framework must be downloaded first, | ||
the dependencies are listed in the pom.xml maven file. | ||
Keep in mind that this is for macOS supported configuration. If you are on windows, | ||
the easiest way is to execute Appium GUI app. | ||
|
||
#### CLONE OR DOWNLOAD THE CODE | ||
$ git clone https://github.com/neiger/AndroidFramework.git | ||
$ git pull | ||
|
||
Then proceed as normal with the POM pattern. | ||
Create a Screens package then a Tests package. | ||
Locate all the UI elements and create the methods | ||
Finally proceed with the test creation order | ||
Use an xml config file to manage the executions. | ||
#### HELPFUL LINKS | ||
* http://appium.io/docs/en/2.0/ | ||
* https://github.com/appium | ||
* https://www.browserstack.com/guide/download-and-install-appium | ||
* https://testng.org/doc/documentation-main.html | ||
* https://www.selenium.dev/ |
Binary file removed
BIN
-3.36 KB
target/test-classes/screens/authsampleapp/AuthSampleLoginScreen.class
Binary file not shown.
Binary file removed
BIN
-2.36 KB
target/test-classes/screens/authsampleapp/WebViewBrowserScreen.class
Binary file not shown.
Binary file removed
BIN
-2.77 KB
target/test-classes/tests/authsampleapp/AuthSampleLoginScreenTests.class
Binary file not shown.