How do I get the handle of a console application’s window
Not sure it works, but you can try that : IntPtr handle = Process.GetCurrentProcess().MainWindowHandle;
Not sure it works, but you can try that : IntPtr handle = Process.GetCurrentProcess().MainWindowHandle;
Have you run Process Explorer or the Windows Task Manager to look at the GDI Objects, Handles, Threads and USER objects? If not, select those columns to be viewed (Task Manager choose View->Select Columns… Then run your app and take a look at those columns for that app and see if one of those is … Read more
What I do is to set a conditional delay with WebDriverWait just before the point I expect to see the alert, then switch to it, like this: from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException browser = webdriver.Firefox() browser.get(“url”) browser.find_element_by_id(“add_button”).click() try: WebDriverWait(browser, 3).until(EC.alert_is_present(), ‘Timed out … Read more