- Install Java
- Install home brew
- Install Android Studio
- Install IntelliJ IDEA, Eclipse or and other IDEA
- Download Appium https://github.com/appium/appium-desktop/releases https://medium.com/tauk-blog/quick-start-guide-for-setting-up-appium-on-an-m1-mac-a629a70a40cb
- Open Appium and click "START SERVER'
- After that server is running
- Click on search button, it will redirect into https://github.com/appium/appium-inspector page.
- Go to installation > release > 2022.9.1(latest one) > and download "Appium-Inspector-mac-2022.9.1.dmg" - https://github.com/appium/appium-inspector/releases/tag/v2022.9.1 , Check this tutorial -> https://www.youtube.com/watch?v=WZuS8qP45xY
CONNECT REAL ANDROID MOBILE DEVICE ON MAC
- Java install on system. JAVA_HOME is set in environment variable command to Check Java version "java -version" , "javac -version"
- Need an Android Device and cable to connect. and can also download "Vysor" App from playstore to puts your Android on your desktop.
- ADD ENVIRONMENT VARIABLE *
`nano ~/.zshrc` or "bashrc"
- Then set
export ANDROID_HOME=/Users/FOLDER_NAME/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH
* After that run ─>
source ~/.zshrc
* NOTED THAT -> For find Android path can run command-
which android
And for JAVA_HOME run -
which java
<img width="474" alt="Screen Shot 2022-10-31 at 1 46 59 PM" src="https://user-images.githubusercontent.com/32488952/198957543-299f84a0-7ba2-4e48-88e9-541c81e93dcb.png">
- Enable Phone DEVELOPER MODE and USB Debugging.
- run command ->
adb devices
and check device ID is displaying
Create Project ( Eclipse ) reference tutorial -> https://www.youtube.com/watch?v=BEF-d1xjV4Q&list=PLhW3qG5bs-L8npSSZD6aWdYFQ96OEduhk&index=6
- Open Eclipse > click on file > select other > select Maven project.
- Go to pom.xml and add dependency (Maven / gradle) dependencies - https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java https://mvnrepository.com/artifact/io.appium/java-client
Create Project ( Android Studio ) reference tutorial -> https://www.youtube.com/watch?v=YecsinHl88A
- Open Android Studio > create project
- App > java > test > create file
- Go to gradle and add dependency dependencies - https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java https://mvnrepository.com/artifact/io.appium/java-client
Create Project ( IntelliJ ) reference tutorial -> https://www.youtube.com/watch?v=i1tQ1pjEFWw
Set capacity
- Run Appium server GUI
- Then run Appium Inspector. Set Remote host - 127.0.0.1, Remote Path - /wd/hub
- Set Desired Capabilities
cap.setCapability("deviceName", "OPPO A15");
`
cap.setCapability("udid", "8DIJRW5PZPGY5TRK");
cap.setCapability("platformName", "Android");
cap.setCapability("platformVersion", "10");
cap.setCapability("appPackage", "Package_name");
cap.setCapability("appActivity", "Activity_name");
cap.setCapability("ignoreHiddenApiPolicyError", true);
How to find app activity and app package check that video - https://www.youtube.com/watch?v=N7vY3cPSo8g&list=PLhW3qG5bs-L8npSSZD6aWdYFQ96OEduhk&index=9
Find face any error like "I can't find Disable Permission Monitoring on my device Samsung A52" Resolve this issue follow this step ->
"I have the same error, with my phone (Realme C3), I solved with the following way:
Step 1. First Enable Developer Option
Step 2. second step enable USB Debugging
And very important Step: Step 3. Search for "Disable Permission Monitoring" and Enable it."
If facing issue while running appium script on android devices, Follow this step
Stop appium server and execute below commands
adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server.test
Top comments (3)
Install JDK using Homebrew: Once Homebrew is installed, you can install the JDK for ARM-based Macs by running the following command:
bash
This will install the Temurin JDK, which is compatible with ARM-based Macs.
Verify Installation: After installation, you can verify that Java is installed by running:
bash
https://www.youtube.com/watch?v=kBESOqobduE&t=3105s
maven library - mvnrepository.com/