
[英]MAYA Python Script , getting a position of an selected object using GetAttr
[英]Python RPA Script - getting name of selected object
我正在使用鍵盤和鼠標包在第三方應用程序中選擇一個接受數據輸入的窗口。 我想處理應用程序的例外情況,即該應用程序不接受對文本框或表單的選擇,因此當出現問題時腳本不會變得無賴。
在所有大寫字母部分中都可以看到,有沒有可以處理此問題的軟件包或方法?
例:
Keyboard.press_and_release( '標簽')
time.sleep(1.5)
#edit旅行
keyboard.press_and_release( 'ALT + E')
time.sleep(.25)
keyboard.press_and_release('alt+3')
#click tab 3
time.sleep(.5)
#tab to the auth window
keyboard.press_and_release('tab')
time.sleep(.2)
keyboard.press_and_release('tab')
time.sleep(.2)
keyboard.press_and_release('tab')
我想在這里驗證文本框是否在應用程序內處於活動狀態,例如Window.getactiveobject()或突出顯示區域?
time.sleep(.4)
#delete any misc numbers in the auth text
keyboard.press_and_release('delete')
keyboard.write(current_Auth)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.