Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

I have encountered with this issue and I have correct gui elements

$
0
0

This issue I already used correct elements and class used by printing identification of class program apptitle [Error]this error shows:(https://i.stack.imgur.com/xJ22H.png)

from pywinauto import Application, findwindowsimport pywinauto.applicationfrom pywinauto.keyboard import send_keyspath=r"C:\Users\Administrator\Desktop\Hardware change\hard-disk-serial-number-changer-1.0-installer.exe"apptitle="Hard Disk Serial Number Changer"try:    app=Application(backend="uia").connect(title=apptitle)except findwindows.ElementNotFoundError:    print("App is not connected")try:    app=Application(backend="uia").start(path)    app.wait_until("ready")    edit_control = app.child_window(auto_id="460840", control_type="Edit")    print("Edit control found:", edit_control)    print("Control rectangle:", edit_control.rectangle())    edit_control.click()    app.wait_cpu_usage_lower(threshold=1, timeout=5, usage_interval=1)    send_keys('^a')    send_keys('{{BACKSPACE}}')except pywinauto.application.AppStartError:    print("Directory not found or app is not specified")except pywinauto.findwindows.ElementNotFoundError:    print("You have included incorrect gui elements")

Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>