I am using Xamarin UiTest for Automating my android application.When i run the test the splash screen loads up in the device and uitest will wait for locating an element but it is failing after waiting for 60 sec.I tried locating using xpath and Id but it is not locating the element
I tried locating using xpath,marked and Id but it is not locating the element.The element has a id associated with it-txtusername.I am using Honor device for running this test.
Actually the login screen is a webview.Please click the image for more details
[Test]
public void FirstTest()
{
app.WaitForElement(c => c.Marked("txtusername"), timeout: TimeSpan.FromSeconds(60));
app.EnterText(c => c.Id("txtusername"),"abc");
app.DismissKeyboard();
}
Code for initializing the app
public class AppInitializer
{
public static IApp StartApp(Platform platform)
{
if (platform == Platform.Android)
{
return ConfigureApp
.Android
//.InstalledApp("TRL.Software.IMAAPMobile")
.ApkFile(@"C:Xamarin.UITest-master\Xamarin.UITest-master\CrossPlatformTest\ik.apk")
.DeviceSerial("CYG3Y18809026095")
.PreferIdeSettings()
.StartApp();
}
return ConfigureApp
.iOS
.StartApp();
}
}
Any help is appreciated