Error in using UIAutomatorviewer for testing Android app in Appium

前端 未结 19 1745
甜味超标
甜味超标 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:09

    In case of rooted devices: Enable the root access in developer options for adb. Restart adb as root

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

    try switching Off and then ON the USB debugging option.. this work for me

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

    Answer to your question #2 You can inspect Android app directly from your real Android device.

    You need to:

    • Connect Android device to your computer/laptop
    • Go to Android device Settings -> Enable Developer Options and Android debbuging

    Please see here:

    • Start the app you wish to inspect in your Android device

    • Open up the Chrome browser on your computer/laptop and do a right click -> More Tools -> Inspect devices -> Click on your device -> (Click on Android device OK to authorize) -> Click Inspect

    Please see here:

    That's it. Hope it helps!

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

    1) stop appium Server

    2) open an emulator device

    3) go into settings > developer options > Enable view attribute inspection

    4) developer options in invisible? Go into settings > Tap on About device/phone > Scroll down till the last option(Build number) > Continuously Tap on "Build number" for 7 times > you should get an Toast message "You're a developer" > come back from that screen > Go back into settings > Now you should see developer options Tap on it > Enable view attribute inspection

    5) You should no more get this error message

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

    What worked for me:

    stop appium
    open an emulator device (tested with Android 7.1.1)
    go into settings > developer options > Enable view attribute inspection
    open a shell on the computer, cmd or terminal depending on your OS
    enter the following commands:
    adb shell
    su
    cd /data
    cd /local
    chmod 777 tmp

    start uiautomatorviewer
    take an xml screenshot

    "su chmod 777 /data/local/tmp" didnt work for me so I drilled down and it worked.
    I assume that you have to do this in an emulator and not a physical device unless the device is rooted. ¯ \ _ (ツ)_/¯

    Lotsa Luck!

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

    Check whether you have enabled these under "developer options" in the phone.

    1. Verify apps via USB
    2. View attribute inspection
    3. USB debugging
    0 讨论(0)
提交回复
热议问题