android app xueqiu练习:org.openqa.selenium.InvalidArgumentException: org.json.JSONException: No value for strategy

android模拟器上安装了xueqiu,appium也启动起来了,但是不知道为什么无法定位元素,已经百度好久了,还是找不到原因,来寻求帮助~

代码如下:

@BeforeAll
    public static void setUp()
    {
        try {
            DesiredCapabilities caps = new DesiredCapabilities();
            caps.setCapability("platformName", "Android");
            caps.setCapability("udid", "emulator-5554");
            caps.setCapability("deviceName", "xxxx");

            caps.setCapability("appPackage", "com.xueqiu.android");
            caps.setCapability("appActivity", ".view.WelcomeActivityAlias");
            driver = new AndroidDriver<>(new URL("http://localhost:8200/wd/hub"), caps);
//            System.out.println(driver.getCurrentUrl()+driver.getDeviceTime());
//            driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        }catch (MalformedURLException e)
        {
            e.printStackTrace();
        }

    }

    @Test
    public void helloSnowBall() throws InterruptedException {
        Thread.sleep(10000);
        driver.findElement(By.id("com.xueqiu.android:id/home_search")).click();
        //定位搜索页搜索框
        driver.findElement(By.id("com.xueqiu.android:id/search_input_text")).sendKeys("alibaba");

    }

报错如下:
···
org.openqa.selenium.InvalidArgumentException: org.json.JSONException: No value for strategy
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘DESKTOP-H34TLLL’, ip: ‘192.168.116.2’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘11.0.5’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {firstMatch: [{appium:appActivity: .view.WelcomeActivityAlias, appium:appPackage: com.xueqiu.android, appium:deviceName: xxxx, appium:udid: emulator-5554, platformName: android}], javascriptEnabled: true, platform: ANY, platformName: Android}
Session ID: 9f24e3bb-35fe-46bd-a717-7c8c2a5ac6e2
*** Element info: {Using=id, value=com.xueqiu.android:id/home_search}

at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:247)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:61)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:372)
at io.appium.java_client.DefaultGenericMobileDriver.findElementById(DefaultGenericMobileDriver.java:69)
at io.appium.java_client.AppiumDriver.findElementById(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElementById(AndroidDriver.java:1)
at org.openqa.selenium.By$ById.findElement(By.java:188)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:57)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)
at android.Hello.helloSnowBall(Hello.java:47)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:212)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:208)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:115)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:115)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

···
pom中引入的依赖如下:
···

org.seleniumhq.selenium
selenium-server
3.141.59


org.seleniumhq.selenium
selenium-java
3.141.59


io.appium
java-client
7.5.1

47行是哪一行

47行如下:

        driver.findElement(By.id("com.xueqiu.android:id/home_search")).click();

原本setUp方法中有一行隐式等待,也是报错的,我就注释掉了,如果将隐式等待放出来报错又变了,
注释代码如下:

            driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

报错如下:

"C:\software\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\jbr\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\software\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\lib\idea_rt.jar=59977:C:\software\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\software\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\lib\idea_rt.jar;C:\software\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\plugins\junit\lib\junit5-rt.jar;C:\software\JetBrains\IntelliJ IDEA Community Edition 2019.3.3\plugins\junit\lib\junit-rt.jar;C:\Users\13772\IdeaProjects\MavenLearn\target\test-classes;C:\Users\13772\IdeaProjects\MavenLearn\target\classes;C:\software\apache-maven-3.6.3\repository\org\testng\testng\7.3.0\testng-7.3.0.jar;C:\software\apache-maven-3.6.3\repository\com\beust\jcommander\1.78\jcommander-1.78.jar;C:\software\apache-maven-3.6.3\repository\org\apache\ant\ant\1.10.3\ant-1.10.3.jar;C:\software\apache-maven-3.6.3\repository\org\apache\ant\ant-launcher\1.10.3\ant-launcher-1.10.3.jar;C:\software\apache-maven-3.6.3\repository\com\google\inject\guice\4.2.2\guice-4.2.2-no_aop.jar;C:\software\apache-maven-3.6.3\repository\javax\inject\javax.inject\1\javax.inject-1.jar;C:\software\apache-maven-3.6.3\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-java\3.141.59\selenium-java-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-api\3.141.59\selenium-api-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-edge-driver\3.141.59\selenium-edge-driver-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-firefox-driver\3.141.59\selenium-firefox-driver-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-ie-driver\3.141.59\selenium-ie-driver-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-opera-driver\3.141.59\selenium-opera-driver-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-remote-driver\3.141.59\selenium-remote-driver-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-safari-driver\3.141.59\selenium-safari-driver-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-support\3.141.59\selenium-support-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\net\bytebuddy\byte-buddy\1.8.15\byte-buddy-1.8.15.jar;C:\software\apache-maven-3.6.3\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\software\apache-maven-3.6.3\repository\com\google\guava\guava\25.0-jre\guava-25.0-jre.jar;C:\software\apache-maven-3.6.3\repository\com\google\code\findbugs\jsr305\1.3.9\jsr305-1.3.9.jar;C:\software\apache-maven-3.6.3\repository\org\checkerframework\checker-compat-qual\2.0.0\checker-compat-qual-2.0.0.jar;C:\software\apache-maven-3.6.3\repository\com\google\errorprone\error_prone_annotations\2.1.3\error_prone_annotations-2.1.3.jar;C:\software\apache-maven-3.6.3\repository\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;C:\software\apache-maven-3.6.3\repository\org\codehaus\mojo\animal-sniffer-annotations\1.14\animal-sniffer-annotations-1.14.jar;C:\software\apache-maven-3.6.3\repository\com\squareup\okhttp3\okhttp\3.11.0\okhttp-3.11.0.jar;C:\software\apache-maven-3.6.3\repository\com\squareup\okio\okio\1.14.0\okio-1.14.0.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-chrome-driver\3.141.59\selenium-chrome-driver-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\selenium-server\3.141.59\selenium-server-3.141.59.jar;C:\software\apache-maven-3.6.3\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\software\apache-maven-3.6.3\repository\org\seleniumhq\selenium\jetty-repacked\9.4.12.v20180830\jetty-repacked-9.4.12.v20180830.jar;C:\software\apache-maven-3.6.3\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;C:\software\apache-maven-3.6.3\repository\org\junit\jupiter\junit-jupiter\5.8.0-M1\junit-jupiter-5.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-runner\1.8.0-M1\junit-platform-runner-1.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\apiguardian\apiguardian-api\1.1.1\apiguardian-api-1.1.1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-launcher\1.8.0-M1\junit-platform-launcher-1.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-suite-api\1.8.0-M1\junit-platform-suite-api-1.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-suite-commons\1.8.0-M1\junit-platform-suite-commons-1.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\io\qameta\allure\allure-junit5\2.13.8\allure-junit5-2.13.8.jar;C:\software\apache-maven-3.6.3\repository\io\qameta\allure\allure-junit-platform\2.13.8\allure-junit-platform-2.13.8.jar;C:\software\apache-maven-3.6.3\repository\io\qameta\allure\allure-java-commons\2.13.8\allure-java-commons-2.13.8.jar;C:\software\apache-maven-3.6.3\repository\io\qameta\allure\allure-model\2.13.8\allure-model-2.13.8.jar;C:\software\apache-maven-3.6.3\repository\org\apache\tika\tika-core\1.24.1\tika-core-1.24.1.jar;C:\software\apache-maven-3.6.3\repository\org\jooq\joor-java-8\0.9.13\joor-java-8-0.9.13.jar;C:\software\apache-maven-3.6.3\repository\org\junit\jupiter\junit-jupiter-engine\5.6.2\junit-jupiter-engine-5.6.2.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-commons\1.6.2\junit-platform-commons-1.6.2.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-engine\1.6.2\junit-platform-engine-1.6.2.jar;C:\software\apache-maven-3.6.3\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\software\apache-maven-3.6.3\repository\junit\junit\4.13.2\junit-4.13.2.jar;C:\software\apache-maven-3.6.3\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\software\apache-maven-3.6.3\repository\com\fasterxml\jackson\core\jackson-databind\2.12.2\jackson-databind-2.12.2.jar;C:\software\apache-maven-3.6.3\repository\com\fasterxml\jackson\core\jackson-annotations\2.12.2\jackson-annotations-2.12.2.jar;C:\software\apache-maven-3.6.3\repository\com\fasterxml\jackson\core\jackson-core\2.12.2\jackson-core-2.12.2.jar;C:\software\apache-maven-3.6.3\repository\com\fasterxml\jackson\dataformat\jackson-dataformat-yaml\2.12.2\jackson-dataformat-yaml-2.12.2.jar;C:\software\apache-maven-3.6.3\repository\org\jyaml\jyaml\1.3\jyaml-1.3.jar;C:\software\apache-maven-3.6.3\repository\org\yaml\snakeyaml\1.28\snakeyaml-1.28.jar;C:\software\apache-maven-3.6.3\repository\com\opencsv\opencsv\5.4\opencsv-5.4.jar;C:\software\apache-maven-3.6.3\repository\org\apache\commons\commons-lang3\3.11\commons-lang3-3.11.jar;C:\software\apache-maven-3.6.3\repository\org\apache\commons\commons-text\1.9\commons-text-1.9.jar;C:\software\apache-maven-3.6.3\repository\commons-beanutils\commons-beanutils\1.9.4\commons-beanutils-1.9.4.jar;C:\software\apache-maven-3.6.3\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\software\apache-maven-3.6.3\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\software\apache-maven-3.6.3\repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;C:\software\apache-maven-3.6.3\repository\org\junit\jupiter\junit-jupiter-api\5.8.0-M1\junit-jupiter-api-5.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\jupiter\junit-jupiter-params\5.8.0-M1\junit-jupiter-params-5.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-surefire-provider\1.3.2\junit-platform-surefire-provider-1.3.2.jar;C:\software\apache-maven-3.6.3\repository\org\apache\maven\surefire\surefire-api\2.22.0\surefire-api-2.22.0.jar;C:\software\apache-maven-3.6.3\repository\org\apache\maven\surefire\surefire-logger-api\2.22.0\surefire-logger-api-2.22.0.jar;C:\software\apache-maven-3.6.3\repository\org\apache\maven\surefire\common-java5\2.22.0\common-java5-2.22.0.jar;C:\software\apache-maven-3.6.3\repository\io\appium\java-client\7.5.1\java-client-7.5.1.jar;C:\software\apache-maven-3.6.3\repository\com\google\code\gson\gson\2.8.6\gson-2.8.6.jar;C:\software\apache-maven-3.6.3\repository\org\apache\httpcomponents\httpclient\4.5.13\httpclient-4.5.13.jar;C:\software\apache-maven-3.6.3\repository\org\apache\httpcomponents\httpcore\4.4.13\httpcore-4.4.13.jar;C:\software\apache-maven-3.6.3\repository\commons-codec\commons-codec\1.11\commons-codec-1.11.jar;C:\software\apache-maven-3.6.3\repository\cglib\cglib\3.3.0\cglib-3.3.0.jar;C:\software\apache-maven-3.6.3\repository\org\ow2\asm\asm\7.1\asm-7.1.jar;C:\software\apache-maven-3.6.3\repository\commons-validator\commons-validator\1.7\commons-validator-1.7.jar;C:\software\apache-maven-3.6.3\repository\commons-digester\commons-digester\2.1\commons-digester-2.1.jar;C:\software\apache-maven-3.6.3\repository\commons-io\commons-io\2.8.0\commons-io-2.8.0.jar;C:\software\apache-maven-3.6.3\repository\org\springframework\spring-context\5.3.4\spring-context-5.3.4.jar;C:\software\apache-maven-3.6.3\repository\org\springframework\spring-aop\5.3.4\spring-aop-5.3.4.jar;C:\software\apache-maven-3.6.3\repository\org\springframework\spring-beans\5.3.4\spring-beans-5.3.4.jar;C:\software\apache-maven-3.6.3\repository\org\springframework\spring-core\5.3.4\spring-core-5.3.4.jar;C:\software\apache-maven-3.6.3\repository\org\springframework\spring-jcl\5.3.4\spring-jcl-5.3.4.jar;C:\software\apache-maven-3.6.3\repository\org\springframework\spring-expression\5.3.4\spring-expression-5.3.4.jar;C:\software\apache-maven-3.6.3\repository\org\aspectj\aspectjweaver\1.9.6\aspectjweaver-1.9.6.jar;C:\software\apache-maven-3.6.3\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;C:\software\apache-maven-3.6.3\repository\org\junit\vintage\junit-vintage-engine\5.8.0-M1\junit-vintage-engine-5.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-engine\1.8.0-M1\junit-platform-engine-1.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\org\junit\platform\junit-platform-commons\1.8.0-M1\junit-platform-commons-1.8.0-M1.jar;C:\software\apache-maven-3.6.3\repository\junit\junit\4.13.1\junit-4.13.1.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 android.Hello,helloSnowBall
4月 18, 2021 9:48:43 上午 org.junit.platform.launcher.core.LauncherConfigurationParameters loadClasspathResource
信息: Loading JUnit Platform configuration parameters from classpath resource [file:/C:/Users/13772/IdeaProjects/MavenLearn/target/classes/junit-platform.properties].
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
4月 18, 2021 9:48:44 上午 org.junit.platform.launcher.core.LauncherConfigurationParameters loadClasspathResource
信息: Loading JUnit Platform configuration parameters from classpath resource [file:/C:/Users/13772/IdeaProjects/MavenLearn/target/classes/junit-platform.properties].
4月 18, 2021 9:48:47 上午 io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
信息: Detected dialect: W3C



Test ignored.

org.openqa.selenium.json.JsonException: Expected to read a START_MAP but instead have: END. Last 0 characters read: 
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-H34TLLL', ip: '192.168.116.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.5'
Driver info: driver.version: AndroidDriver

	at org.openqa.selenium.json.JsonInput.expect(JsonInput.java:290)
	at org.openqa.selenium.json.JsonInput.beginObject(JsonInput.java:220)
	at org.openqa.selenium.json.MapCoercer.lambda$apply$1(MapCoercer.java:64)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:145)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:126)
	at org.openqa.selenium.json.Json.toType(Json.java:69)
	at org.openqa.selenium.json.Json.toType(Json.java:55)
	at org.openqa.selenium.json.Json.toType(Json.java:50)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:87)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:247)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
	at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
	at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteTimeouts.implicitlyWait(RemoteWebDriver.java:780)
	at android.Hello.setUp(Hello.java:36)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:68)
	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$8(ClassBasedTestDescriptor.java:375)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:373)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:193)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:132)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:115)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)





Process finished with exit code -1

安卓的模拟器:

appium:

放个代码原图:

更新下状态:
1、重新换了个安卓模拟器(API 29),成功了
2、在安卓模拟器(API 30)上,写错了一行代码,端口写成了8200【原先是试过4723,一直提示无法连接,换成8200就可以,所以就改成了8200】,现在改成4723后,居然也可以了

关闭