Error in using UIAutomatorviewer for testing Android app in Appium

前端 未结 19 1746
甜味超标
甜味超标 2020-12-06 00:54

I have to automate an Android application, I am doing the same through Appium.

The problem I am facing is after launching the Appium server, the app is getting instal

相关标签:
19条回答
  • 2020-12-06 01:14

    I got it resolved

    I closed the Appium Server running on my machine and opened it again. Later open uiautomater, and it worked for me

    0 讨论(0)
  • 2020-12-06 01:17

    Way to bypass the ERROR:

    could not get idle state.

    By using uiautomator to get uix and screenshot.

    public class DeviceMethods extends UiAutomatorTestCase {
    public void dump(){
    
    
        try {
            getUiDevice().dumpWindowHierarchy("window_dump.uix") ;
            getUiDevice().takeScreenshot(new File("/data/local/tmp/window_dump.png"));
    
    
        } catch (Exception e) {
    
        }
    
    }
    

    you need to create the uiautomator jar and push it to /data/local/tmp

    use this tutorial on how to use uiautomator

    after you get the files just open them in uiautomatorviewer

    0 讨论(0)
  • 2020-12-06 01:18

    I got also the same issue (Also if Appium Server was not running). After switch, OFF / ON USB-Debugging was working for me.

    0 讨论(0)
  • 2020-12-06 01:19

    Stop the Appium Server. Then try again. It works.

    0 讨论(0)
  • 2020-12-06 01:20

    This happens because adb is using port and it's blocked by appium server.

    I have found out best solution for this

    Kill the adb.exe from taskbar processes and try launching uiautomatorviewer again

    0 讨论(0)
  • 2020-12-06 01:22

    we have to use device which has API level morethan 17 or jelly bean

    0 讨论(0)
提交回复
热议问题