0% found this document useful (0 votes)
11 views7 pages

CompanionApp - Automation Setup

The document provides a comprehensive guide for setting up Companion App Automation, detailing the necessary software installations for both Android and iOS platforms, including Eclipse, Java, Appium Desktop, Android SDK, and Xcode. It includes step-by-step instructions for downloading, installing, and configuring each software, as well as setting environment variables. Additionally, it outlines the process for connecting devices and configuring Desired Capabilities for automation testing.

Uploaded by

George Sampras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views7 pages

CompanionApp - Automation Setup

The document provides a comprehensive guide for setting up Companion App Automation, detailing the necessary software installations for both Android and iOS platforms, including Eclipse, Java, Appium Desktop, Android SDK, and Xcode. It includes step-by-step instructions for downloading, installing, and configuring each software, as well as setting environment variables. Additionally, it outlines the process for connecting devices and configuring Desired Capabilities for automation testing.

Uploaded by

George Sampras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Companion App Automation Setup

Date Created : 26-May-2021


Softwares required for Installation:

1. Eclipse / Intellij
2. Java
3. Appium Desktop
4. Android SDK
5. Xcode and so on,.[check xcode compatibility with macOS & device OS]

Intellij download link:

https://www.jetbrains.com/idea/download/#section=mac

 Download Community version from the given link (.dmg file)


 Double click on downloaded .dmg file and start following the instructions to
complete the installation

Java download link:

https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html

 Download the MacOS option


 After it gets downloaded, double click on the .dmg file and start following the
instructions
 Open Terminal and type Java to verify the Java installation

Appium Desktop download link:

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:

Android SDK download link:

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,

brew cask install android-platform-tools

 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

 Connect the device and start the Appium server


 Hit the search button in the server
 Connect the device by providing the capabilities in Desired Capabilities section like
the below,

{
"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 & Install HomeBrew

Uninstall Command

`ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)”`

Install Command

`/use/bin/ruby -e “$(curl -fsSL


https://raw.githubusercontent.com/Homebrew/install/master/install)”`

 While installing the home brew, you might require to provide your password which
should have admin rights

 To install node use the below command,

brew install node

 Execute below commands:

sudo xcode-select-reset

sudo xcode-select-switch /Applications/Xcode.app

Reference for above:

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

 To install carthage, follow the below command,

brew install carthage

 Also use the following commands,

npm install -g ios-deploy


npm install -g deviceconsole

brew install ideviceinstaller

 Connect the device and start the Appium server


 Hit the search button in the server
 Connect the device by providing the capabilities in Desired Capabilities section like
the below,
{

"platformName": "iOS",

"deviceName": "iPhone 6",

"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

Set Environment Variables:

 Set the environment variables according to your local path in .bash_profile


 To open a bash_profile, follow the below commands

touch ~/.bash_profile

Open ~/.bash_profile

 .bash_profile will be opened in a Textedit. Setup the environment variables


according to your installation folder structure. FYR, blow is how I have configured,

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___________________________________

You might also like