-
Hello, Iam trying to automate a application with pywinauto, it works perfectly when ran on my computer but. we have some issues making it work on PC of our employes. The main issues Iam dealing with right now is clicking an item in popmenu. For the purpose of logging I would like to know if the item in popmenu was clicked. Iam only able to provide a pseudo code but it works like this: Right click to open popmenu Iam looking for a way to get confirmation that the button was actualy clicked. Something like "if button was clicked return true" because the only realiable feedback I can get is a log I get send after the application was ran and I need to know if the button was actually clicked. The main issue is that I cant get visual confirmation that the button was clicked since if its clicked the pop menu goes aways but the same happens if it clicks somewhere else. It's a pretty complicated issue so I apologize it this doesnt make sense. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
Hi. I can only guess about your pseudo code. I would like to clarify your intention. Perhaps what you actually want to confirm is not "whether an element was clicked" but rather "whether a screen transition occurred" or "whether a dialog was displayed"? |
Beta Was this translation helpful? Give feedback.
-
The The pop-menu unfortunately doesnt have a name but the individual items inside the menu do. Thats how I specify the item I want to be clicked. In production I first printed all the menu items and then by the item´s name I specify which item to click. I´am not sure as I dont have that many experiences using the wait_enabled method. I will try to explain better how I wait for windows and other elements.
Its probably worth noting that we do not use pywinauto like this app.SaveAs.Save.click() as we found for our purpose its slower. But we use the children() method like this: dsk = desktop("title") Hope this makes some sense. Let me know what you think. |
Beta Was this translation helpful? Give feedback.
Indeed, since
MenuWrapper
is not a subclass ofUIAWrapper
, I couldn't use methods likeinvoke
orwait_enabled
. I'm sorry.If
MenuItem
can be retrieved, I think it indicates that the GUI is not frozen.In that situation, you're right that
click_input()
moves the mouse pointer, so by capturing …