IeThread().start()
time.sleep(3)
wnd = win32ui.GetForegroundWindow()
if wnd.GetWindowText() == 'File Download - Security Warning':
    win32gui.EnumChildWindows(wnd.GetSafeHwnd(), PushButton, '&Save')
time.sleep(1)
wnd = win32ui.GetForegroundWindow()
if wnd.GetWindowText() == 'Save As':
    win32gui.EnumChildWindows(wnd.GetSafeHwnd(), PushButton, '&Save')
Downloading file using IE from python