Home > other >  About using the pywinauto automation installation software script some of the pit
About using the pywinauto automation installation software script some of the pit

Time:10-15

When I first use pywinauto is also like everyone, all kinds of search on the net, finally search are all the same, here are some some pit, encountered in the development process, use the package (pywinauto scrpy)
A: after start to open the software can't identify window control, error notfoundelement
About this problem, the original poster and card for half a day time, finally hold try attitude, after the start, set up a time. The sleep, and then to connect, incredibly successful, finally after I repeated the experiment, found that this is because after open a installation package program, window loading time is too long, in the loading process, is to get less than next controls such as buttons, etc., so set a time. Sleep can perfectly solve the problem! (some installer exception, while loading the window for a long time, but can also identify)
2: when encountered in the process of installing the pop-up, such as the registry of two identical window
Encounter this kind of problem, I was investigated by using pywinauto, no study, finally, I try to use another python library pyautogui, the library can be according to your own figure cut out in advance and the entire screen contrast, find the same as you figure that position, and then control the mouse click, consult the specific process I blog (pyautogui use notes)!
To be continued -- --
  • Related