Actually I have the same problem. When the UI element searched for doesn't exist, it seems that it takes forever for the program to execute the next action step.
If the element do exist, no problem at all. When the element doesn't exist. I try to manually shorten the time out for the element as well as its ParentFolder. But still it takes about 50 seconds to get to the next step.
Anyway to shorten more?
repo.MyWebApp.UsersTable.ParentFolder.SearchTimeout=3000;
repo.MyWebApp.UsersTable.SearchedUserEmailInfo.SearchTimeout=3000;
if (repo.MyWebApps.UsersTable.SearchedUserEmailInfo.Exists())
{
//do things
}
else
{
//do other
}
.Exists not working Properly
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: .Exists not working Properly
Hello
You could try to use the "WaitForExists()"-method:
Robert
You could try to use the "WaitForExists()"-method:
try { repo.MyWebApps.UsersTable.SearchedUserEmailInfo.WaitForExists(5000); } catch (Exception) { Report.Info("Element doesn't exist"); }or "Exists()" with a specified timeout.
repo.MyWebApps.UsersTable.SearchedUserEmailInfo.Exists(5000);Regards,
Robert