Blog

appium setup

If you are looking for complete set up of appium, you can go through our appium course
http://www.qajobsupport.com/appium-online-training/
you can contact us for any queries or help You will also get free demo sessions

Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn’t exist!

Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist! Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!

Sometimes when we are working on appium automation and got below error when using UIAUTOMATIORVIEWER

Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist! Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException: Remote object doesn't exist!

Now what we should we do to resolve this error

This issue we have faced saveral times and try to resolve this error efficiently

Observation:

We have faced this issue when we run our automation suite using Eclipse or command prompt, in this case adb.exe process is running in background and somehow it still running in background even after closing the automation execution

So when we run our automation suite by Eclipse:

Capture

After that If we try to capture screen using UIAUTOMATORVIEWER then we get the below exception:

Capture

This might happens sometimes

To resolve this issue we need to kill the adb process

We can kill the process from Taskbar in windows and Activity monitor in MAC os

Just go to Taskbar and you may observe adb processes in task bar:

Capture

It will resolve your issue, if you still have any issue, just whatsapp me so that we can have session for that issue

Thanks for visiting us

Please comment if you like this post

If you are looking for complete set up of appium, you can go through our appium course
http://www.qajobsupport.com/appium-online-training/

Page Object model with Appium

pom (page object model - appium)

Welcome to QA JOB SUPPORT
We are not only provide world's best support but also provide training worldwide
We support digital india campaign that's why we choose Online platform to provide training and support
     

Benifits of taking courses from our website:


     You will get 4 hours selenium/appium/java/python training video access free of cost
     Absolutely free To get training videos, contact

+919205725657

whatsapp-512
phone-call-icon-16
If you are looking for complete course of appium, you can go through our appium course
http://www.qajobsupport.com/appium-online-training/
for selenium live training:
http://www.qajobsupport.com/selenium-tutorials/

ADB Usage in Appium Automation

android

Firstly install android sdk and set ANDROID_HOME variable as well as put platform-tools and tools path in PATH variable .

then check adb in command prompt.

#check connected devices
adb devices

If you are not able to see connected device, then check USB debugging in Settings> Develop options

usb_debugging

then you will see below pop up on your device
adb_fingerprint

#input text in android app textbox
adb shell input text 'hello'

#pull file from android device
adb pull source destination

#push file to android device
adb push source destination

#connect adb over wi-fi
adb shell setprop service.adb.tcp.port 5555 && stop adbd && start adbd adb connect

#Unlock your Android screen
adb shell input keyevent 82

#Lock your Android screen
adb shell input keyevent 6
adb shell input keyevent 26

#Open default browser
adb shell input keyevent 23

#Keep your android phone volume up(+)
adb shell input keyevent 24

#Keep your android phone volume down(-)
adb shell input keyevent 25

#Go to your Android Home screen
adb shell input keyevent 3

#Take Screenshot from adb
adb shell screenshot /sdcard/test.png

#Another Screen capture command
#screencap [-hp] [-d display-id] [FILENAME] # -h: this message # -p: save the file as a png. # -d: specify the display id to capture, default 0

#start clock app
adb shell am start com.google.android.deskclock

#stop clock app
adb shell am force-stop com.google.android.deskclock

#start wifi settings manager
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings

#Testing wifi status – Thanks Saimadhu
adb shell am start -n com.android.settings/.wifi.WifiStatusTest

Below commands only works on Rooted Devices – Thanks Pooja Shah for asking the questions
#wifi on
adb shell svc wifi enable

#wifi off
adb shell svc wifi disable

#Mobile Data on
adb shell svc data enable

#Mobile Data off
adb shell svc data disable

If you are looking for complete course of appium, you can go through our appium course
http://www.qajobsupport.com/appium-online-training/

Automating hybrid app using Appium

1. If you know automating native apps but having problems in automation of hybrid apps
2. You must know there are two types of context in hybrid app: first is native view and another is web view
3. You need to switch to different context in between your testcases
4. You can know the context names using below code:
for(String context: driver.getContextHandles()){
System.out.println(context);
}
5. You can switch to context using :
driver.context(context);

If you are looking for complete course of appium, you can go through our appium course
http://www.qajobsupport.com/appium-online-training/

Unable to run tests on Android 7.0 (Android N) adb.exe -s device shell “ps ‘uiautomator'”

If you are getting error like:

executing cmd: adb.exe -s device shell "ps 'uiautomator'"

you need to update adb.js file

https://drive.google.com/file/d/0B2sM-KIv6mGUUGhCRXZIZWJZbVRtQWtsbVVlNFhhOVhmNnVF/view?usp=sharing

After updating adb.js file, you need to uninstall appium settings and unlock app each time before executing next session.

you can use adb uninstall appium.io.unlock

and

adb uninstall appium.io.settings


If you are looking for complete course of appium, you can go through our appium course
http://www.qajobsupport.com/appium-online-training/

Blog Post Title

What goes into a blog post? Helpful, industry-specific content that: 1) gives readers a useful takeaway, and 2) shows you’re an industry expert.

Use your company’s blog posts to opine on current industry topics, humanize your company, and show how your products and services can help people.