I am testing my mobile app using Appium
. When app starting it directly navigation to HomeActivity
sometimes(if user already logged in). If user not logged in then opening LoginActivity
.
So, how can I know which activity
starting? so that I can execute logout code accordingly.
This code not executing at all because app navigation to HomeActivity
directly instead of LoginActivity
.
public void DemoTest()
{
AndroidElement editElement1 = driver.FindElementById("input_name");
editElement1.Clear();
editElement1.SendKeys("ak@ct");
AndroidElement editElement2 = driver.FindElementById("input_password");
editElement2.Click();
editElement2.SendKeys("qa");
driver.HideKeyboard();
driver.Manage().Timeouts().ImplicitWait =TimeSpan.FromSeconds(4);
AndroidElement editElement3 = driver.FindElementById("btnLogin");
editElement3.Click();
}
Aucun commentaire:
Enregistrer un commentaire