简体   繁体   English

Appium Inspector对应用程序图像上的单击没有响应

[英]Appium Inspector doesn't respond to click on the app image

New to Appium. Appium的新手。 Its Inspector (GUI version) doesn't respond to any click on the app image (no logs on the server, no App Source content either after clicking). 它的检查器(GUI版本)不响应对应用程序映像的任何单击(单击后,服务器上也没有日志,也没有应用程序源内容)。 If "Tap By Coordinates" is clicked, it generates logs on the server only. 如果单击“按坐标点击”,则仅在服务器上生成日志。 I tried both appium-desktop-Setup-1.0.2-beta2.exe and appium-desktop-web-setup-1.6.2.exe (v1.8.1), the results are the same. 我尝试了appium-desktop-Setup-1.0.2-beta2.exe和appium-desktop-web-setup-1.6.2.exe(v1.8.1),结果都是一样的。

The real test phone used is Moto X Sprint (Android 4.2.2) The beginning of the log is copied below, plus the code. 真正使用的测试电话是Moto X Sprint(Android 4.2.2),日志的开头被复制到下面,并加上代码。

[Appium] Welcome to Appium v1.8.1
[Appium] Non-default server args:
[Appium]   sessionOverride: true
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions
[HTTP] {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 2 ms - 40
[HTTP] 
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appActivity":"com.android.vending.AssetBrowserActivity","appPackage":"com.android.vending","deviceName":"My Phone", ... ... 

... ... ... ... …………

//My code //我的代码

package tests;

import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;

public class AppiumTest {

    public static void main(String[] args) {

        //Set the Desired Capabilities
        DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability("deviceName", "My Phone");
        caps.setCapability("udid", "LXSZ2A0007"); //Give Device ID of your mobile phone
        caps.setCapability("platformName", "Android");
        caps.setCapability("platformVersion", "4.2.2");
        caps.setCapability("appPackage", "com.android.vending");
        caps.setCapability("appActivity", "com.android.vending.AssetBrowserActivity");
        caps.setCapability("noReset", "true");

        //Instantiate Appium Driver
        try {
                AppiumDriver<MobileElement> driver = new AndroidDriver<MobileElement>(new URL("http://0.0.0.0:4723/wd/hub"), caps);

        } catch (MalformedURLException e) {
            System.out.println(e.getMessage());
        }
    }

}

Note that it was pointed to "Google Play" on the top (see a screenshot below). 请注意,它指向顶部的“ Google Play”(请参见下面的屏幕截图)。 No responses no matter where I pointed to on the image. 无论我在图像上指向何处,都没有响应。

Screenshot of the App Image 应用程序图像的屏幕截图

您还可以使用UIAutomatorViewer查找元素,这些元素可以在Android sdk下找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM