Clarification required for Appium Hybrid App automation in android device in setting driver properties. Kindly assist

I have just started to learn Appium automation through videos in youtube. However I got struck while trying to automate hybrid app using Java client. Kindly let me know if you can assist me in resolving this issue. I have been stuck for more than 5 days :frowning:

I have got struck in below line of code.

System.out.println(“Setting Driver”);
URL add = new URL(“http://127.0.0.1:4723/wd/hub”);
System.out.println(“Done setting URL”);
driver = new AndroidDriver(add, cap);
System.out.println(“Driver SET”);

What i can see in the console is “Setting Dtiver” and “Done setting URL” is getting printed and “Driver SET” is not getting printed. which means my Android Driver instantiation is not happening properly.
The Appium server has started properly and App gets launched as well and the final logs in the server where it gets struck is as below :

info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:false}
info: [debug] Device is at API Level 23
info: [debug] executing cmd: D:\Appium\AndroidSDK\platform-tools\adb.exe -s 7TYTWCMJOBMZIZVC shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.MyApp/MyApp”
info: [debug] We tried to start an activity that doesn’t exist, retrying with . prepended to activity
info: [debug] Getting device API level
info: [debug] executing cmd: D:\Appium\AndroidSDK\platform-tools\adb.exe -s 7TYTWCMJOBMZIZVC shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 23
info: [debug] executing cmd: D:\Appium\AndroidSDK\platform-tools\adb.exe -s 7TYTWCMJOBMZIZVC shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.MyApp/.MyApp”
info: [debug] Waiting for pkg “com.MyApp” and activity “MyApp” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\Appium\AndroidSDK\platform-tools\adb.exe -s 7TYTWCMJOBMZIZVC shell “dumpsys window windows”
info: ← POST /wd/hub/session - - ms - -

Below is the System Details :
Windows 7, Appium Version : 1.4.16.1

I have set all required capabilities in the code (AppPackage, AppActivity, AppWaitActivity, DeviceName)

Kindly let me know if any more details are required.

Hope this video helps you : https://youtu.be/Pc_CkDO_2Pc

1 Like

Issue was : Drivers installed in my machine were not compatible with the android device I am using. I used a lower version of device and installed required drivers and it worked! Thanks!