I'm trying to find out, what Application was converted into...
could you post please some example on... How to get Application.sleep... and Application.SendKeys(), and Application.ErrorAsException = false... And such?
Thanks,
Gergely.
Edit:
To be clear.. I have a method that waits for a string to appear in a given control. This looks like this:
Code: Select all
public bool WaitforStringToAppear(Control control, string toBeFound, string window, int maxTimeToWait)
{
Application.ErrorAsException = false;
bool found = false;
form = Application.FindFormTitle(window, SearchMatchMode.MatchRegExp, true, 10000);
form.Focus();
System.DateTime start = System.DateTime.Now;
// While the start time + maxTimeToWait is bigger then the
// current time, the process shell sleep.
while (!found && start.AddMilliseconds(maxTimeToWait) > DateTime.Now)
{
Element child = control.Element.FindChildValue(toBeFound, SearchMatchMode.MatchRegExp);
if ( child != null )
{
found = true;
}
else
{
Application.Sleep(1);
}
}
Application.ErrorAsException = true;
return found;
}
And also i have a waitforcontroltoappear..