CompanionApp - Automation Setup
CompanionApp - Automation Setup
1. Eclipse / Intellij
2. Java
3. Appium Desktop
4. Android SDK
5. Xcode and so on,.[check xcode compatibility with macOS & device OS]
https://www.jetbrains.com/idea/download/#section=mac
https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
https://appium.io/downloads.html
Tap on the Appium-Desktop for OSx link from the given URL
Download the required / latest version of Appium Desktop
Double click on downloaded .dmg file and start following the instructions to
complete the installation
Move the Appium to the Applications folder when the system insists
If it is prompt that it cannot open Appium, then Goto System Preference -> Security
& Privacy -> Appium-Open Anyway
Android Installation:
https://developer.android.com/studio
Download the Android SDK for Mac from the given link and unzip it
To execute the Android Automation, adb commands are very important. To install
adb, we need to execute the below command in Terminal,
Connect an Android device, now type the below command to verify whether adb is
installed,
adb devices
If it didn’t list the attached devices then enable the USB debugging mode in your
attached device which will be available in Developer options
In the latest Android versions – you need to open Settings -> About Phone and tap
Build number 7 times to get the Developer Options to list in your Setting page.
Reference link is below,
https://developer.android.com/studio/debug/dev-options
{
"platformName": "android",
"platformVersion": "9",
"deviceName": "Galaxy S8",
"appPackage": "clover.companion.app.dev",
"appActivity":
"clover.companion.app.ui.activity.splash_screen.SplashScreenActivity",
"driverUrl": "http://127.0.0.1:4723/wd/hub"
}
In case of any future modifications, if this doesn’t work then, use the below link to
find the appPackage and appActivity,
https://www.toolsqa.com/mobile-automation/appium/how-to-find-apppackage-
and-appactivity-for-apk-file/
And then you will notice that the App gets launched in your attached device. And the
Appium server will be ready to inspect like the below,
This also means the Appium server is ready to support the automation framework
iOS Installation:
From Appstore get the Xcode to your system (it may even take 2 hours to download)
Double click on Xcode, accept the license and components will be installed
Download the Command line tools for your Xcode from the below link, (it will
prompt for an apple ID/pwd)
https://developer.apple.com/download/more/
Uninstall Command
Install Command
While installing the home brew, you might require to provide your password which
should have admin rights
sudo xcode-select-reset
https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-
config.md
Move to the location of the node modules using the below command
mkdir -p Resources/WebDriverAgent.bundle
./Scripts/bootstrap.sh -d
cd bash Scripts/bootstrap.sh-d
"platformName": "iOS",
"platformVersion": "12.4.5",
"udid": "c60299fd7dedef8ca287d31de0ab9a2fb31a51e6",
"automationName": "XCUITest",
"bundleId": "com.firstdata.clover-companion-app"
And refer above screen images for Android and follow the same
Also, in addition to that, for iOS, we have to setup the WebdriverAgent project which
is inside the Appium contents and execute the same in our connected device thru
XCode.
We have to modify the bundleID of that project to a unique value and make the
developer to your Apple ID
touch ~/.bash_profile
Open ~/.bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
export ANDROID_HOME=/Users/<User-ID>/Library/Android/sdk
export M2_HOME=/Applications/apache-maven-3.8.1
export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:
$M2_HOME/bin
___________________________________END___________________________________