A new session could not be created. (Original error: 'java -version' failed. Error: spawn ENOENT)

前端 未结 3 1615
抹茶落季
抹茶落季 2020-12-22 05:05

I\'m trying to run a test that just opens whatsapp messenger using appium. I\'m getting the error: A new session could not be created. (Original error: \'java -versi

相关标签:
3条回答
  • 2020-12-22 05:47

    Problem solved! For some reason there was missing the path for System32 in my PATH variable! I realized it when i run android on command line and there was a message: xcopy is not recognized as an internal or external command although sdk manager was running normally.

    0 讨论(0)
  • 2020-12-22 05:53

    You need to open the appium application and launch it using the same capabilities in your code. If you are already opened it the stop it and relaunch it again, after that run your test again.

    You also need to make sure of your JAVA_HOME and ANDROID_HOME

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

    you need to have driver.quit() in your code.

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