HI All,
I am new to appium.
I am using C# selenium (VSTS) with appium for android app.
i am getting error while launching the app. please suggest how to fix it.
getting error @ line: driver = new AndroidDriver(new Uri (“http://127.0.0.1:4723/wd/hub”), capabilities);
I confirmed with developers about the package name and activity name its correct bt still getting this error:
error: {“status”:33,“value”:{“message”:“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)”,“origValue”:“Activity used to start app doesn’t exist or cannot be launched! Make sure it exists and is a launchable activity”},“sessionId”:null}
my code:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.SetCapability(“deviceName”, “Micromax A110Q”);
capabilities.SetCapability(“platformVersion”, “5.0.2”);
capabilities.SetCapability(“platformName”, “Android”);
capabilities.SetCapability(“appium-version”, “1.3”);
capabilities.SetCapability(“appPackage”, “mypackage.actualpackage”);
capabilities.SetCapability(“appActivity”, “mypackage.actualpackage.HomeActivity”);
//capabilities.SetCapability(“appActivity”, “.HomeActivity”);
capabilities.SetCapability(“app”, @“D:\hagw35\ProjectName.ProjectName.apk”);
driver = new AndroidDriver(new Uri (“http://127.0.0.1:4723/wd/hub”), capabilities);
driver.FindElement(By.Name(“Username*”)).SendKeys(“testvj”);
driver.FindElement(By.ClassName(“android.widget.EditText”)).SendKeys(“Test@123”);
driver.FindElement(By.ClassName(“android.widget.Button”)).Click();
driver.Quit();