I am working on an automatic check-in script for a page game. I want to use selenium win32api to do automation. I have a little problem writing the script, I use the following code to get the current tab handle in selenium:
driver = webdriver.Chrome()
handle = browser.current_window_handle # Get the handle of the current tab
I found out by printing the log that the handle obtained by the above method is a str. I want to know if this handle is related to the handle available in win32api? If it does, how to convert it? If it doesn't matter, then I can only use the method in win32api to traverse all the form titles and find the form handle I need through the title.
Finally, thank you for watching. English is not my native language, please forgive my grammar mistakes.
CodePudding user response:
Well, they are not the same thing. AFAIK, converting Selenium handle into a win32api one is currently impossible. I would suggest you let each type of handle do their jobs.