I have been trying to automate a browser login. As part of login I get a pre-auth pop-up (which is not a browser pop-up nor a native windows pop-up). I have to allow the pop to scan my computer so that I could get to the login page. However I am not able to bring the pop-up window to foreground for further processing.
Things I have tried so far:
Try to use selenium alert function (by this I came to know it is not a browser pop-up). I also tried to get the open handles for all the browser windows (using function window_handle(), I only get one handle that is for the main browser window).
I tried to find all of the open windows on the system using the code below and I get a list of windows handles along with window title, but the window I am looking for does not have a window title.
Code to find titles and hwnd of all the visible windows:
def get_all_windows():
"""Returns dict with window desc and hwnd,
don't ask me how it works!"""
def _MyCallback( hwnd, extra ):
"""Helper function for above??"""
hwnds, classes = extra
hwnds.append(hwnd)
classes[win32gui.GetWindowText(hwnd)] = hwnd
windows = []
classes = {}
win32gui.EnumWindows(_MyCallback, (windows, classes))
return classes
Please give me comments on how I should be taking this thing forward. I have been trying this through the weekend without luck.