jeudi 9 avril 2015

Activity used to start app doesn’t exist or cannot be launched

I am new to appium and are currently trying to create a few simple tests to begin with. My issue is that I cannot launch the application under test at all, the only time it works is with the demo app included in the appium-dotnet-driver solution available via github


http://ift.tt/Z9T4Vk


I have tried 2 different apps on my Nexus 5 and on several emulators but nothing will work (See attached message bellow). Is there som kind of standard on how to write capabilities and what should be included? I have been sitting with this for hours and tried all sorts of combinations but unfortunately I'm stuck here.


Thanks in advance / Jan


SetUp :



System.InvalidOperationException : A new session could not be created. (Original error: Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity) (33)
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities) in AppiumDriver.cs: line 81
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities, TimeSpan commandTimeout) in AppiumDriver.cs: line 114
at OpenQA.Selenium.Appium.Android.AndroidDriver..ctor(Uri remoteAddress, DesiredCapabilities desiredCapabilities, TimeSpan commandTimeout) in AndroidDriver.cs: line 54
at Appium.Samples.AppiumTest.BeforeAll() in AppiumTest.cs: line 38


As I said i have tried numerous combinations but here are a few I have been playing around with. Sometimes are all included sometimes just a few. And btw, the application is installed on my device, but it will not launch.



capabilities.SetCapability("appium-version", "1.3.4.1");
capabilities.SetCapability("platformName", "Android");
capabilities.SetCapability("platformVersion", "4.4");
capabilities.SetCapability("deviceName", "emulator-5554");
capabilities.SetCapability("browserName", "");
capabilities.SetCapability("app", "C:/Users/UserName/Downloads/app.apk");
capabilities.SetCapability("appPackage", "com.company.androidapp");
capabilities.SetCapability("appActivity", ".activities.StartupActivity");

Aucun commentaire:

Enregistrer un commentaire