public static void SetTextRaw(int hwnd, string new_caption) { WindowsAutomation.UI.Window_SetWindowTextRaw(hwnd, new_caption); TestWindowText wait_client = new TestWindowText(hwnd, new_caption); int timeout = 10 * 1000; // 10 seconds int interval = 500; // .5 second; int elapsed; bool success = WindowsAutomation.Timing.WaitObject.WaitForCondition(wait_client, timeout, interval, out elapsed); if (!success) { throw new Errors.AutomationError("Timed out setting text"); } }
public static void SetTextRaw( int hwnd, string new_caption) { WindowsAutomation.UI.Window_SetTextRaw( hwnd , new_caption); TestWindowText wait_client = new TestWindowText( hwnd , new_caption); int timeout = 10 * 1000 ; // 10 seconds int interval = 500; // .5 second; int elapsed; bool success = WindowsAutomation.Timing.WaitObject.WaitForCondition( wait_client, timeout, interval, out elapsed); if (!success) { throw new Errors.AutomationError( "Timed out setting text"); } }