Unable to create new remote session while testing an Android application with Appium

后端 未结 3 685
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-16 23:56

I\'m trying to run an Example of test scripts coded with java in Eclipse with Appium. I run Appium by npm (i\'m using Appium 1.6.3, i\'m not new to Appium i run it before on

相关标签:
3条回答
  • 2021-01-17 00:39

    The reason is because your Appium is running already the app using GUI settings.

    Simultaneously you are trying to run it again from your code.

    What should help : In Appium UI go to Android settings (basic)

    1. Application panel: do not define / launch the app and its activities.

    2. Capabilities panel: define and select {Platform Name, Automation Name, Platform Version}

    0 讨论(0)
  • 2021-01-17 00:46

    You forgot the most important capability, which is the path to the .apk:

    capabilities.setCapability("app", "appPath");
    

    Also, i would recommend on changing from RemoteWebDriver to Android driver, since you will have some more functionality:

    driver = new AndroidDriver(....)
    

    ps: you can update your java-client to 4.1.2 and testng to 6.9.10

    0 讨论(0)
  • 2021-01-17 00:47

    The problem is with the apk file itself, I used an other .apk file with the same configuration i have used and it works fine !

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