I created below code to press Android mobile back button until it comes to a particular window with label "Unassigned" and it is working for the purpose.
below are the issues i'm facing,
1) Report mark this as a Fail step since in several cases it fails Validate. method. I want to avoid that
2) validating take some standard time (around 1.5 mins ) , i want to avoid that, can i override validation time in code
3) is there other better workaround to fit for purpose.
please advice


Code: Select all
public void Invoke_Action_MobileApp()
{
while(Validate_Unassigned_Labe_Not_Exist())
{
Report.Log(ReportLevel.Info, "Invoke Action", "Invoking PressBackKey() on item 'MobileApp'.", repo.MobileApp.SelfInfo);
repo.MobileApp.Self.As<AndroidApp>().PressBackKey();
}
}
public Boolean Validate_Unassigned_Label_Not_Exist()
{
try{
Validate.Attribute(repo.MobileApp.RefImplOrderListActivity.Unassigned1Info, "Text", "Unassigned");
Validate.Attribute(
} catch(Exception e)
{
return true;
}
return false;
}