Cannot click OK on a dialog box
See original GitHub issueQuestion: Need a little bit of direction. I’ve used AutoIT, inspect windows, and all that good stuff with no issues. The below in AutoIT would be running the exe, wait for window dialog, click instance of button or button with OK, and voila.
Run("C:\Program Files (x86)\Common Files\Rockwell\FTAdmin.exe")
WinWaitActive("Select FactoryTalk Directory")
ControlClick("Select FactoryTalk Directory", "OK", 1, "left", 1)
I’ve tried several ways, and nothing seems to work. I did topWindow, dialogs = app.windows(), and when I print out dialogs it gives me the below. The first wrapper is the main application class
hwndwrapper.HwndWrapper - '', Afx:00400000:0
hwndwrapper.DialogWrapper - 'M', MSCTFIME UI
hwndwrapper.DialogWrapper - 'Default IME', IME
from pywinauto.application import Application
app = Application().start("C:\Program Files (x86)\Common Files\Rockwell\FTAdmin.exe")
init_dlg = app.window(title_re="*Select FactoryTalk*", class_name="#32770")
app.init_dlg.OK.click()
I went through several examples and nothing seems to click. I am probably missing something silly.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
can't click OK button in dialog boxes on certain r...
At this resolution, when I click on certain dialog boxes (such as quick measures, drop down list in data view, the OK button...
Read more >We've got an update for you, can't click on anything.
Just today i got this dialogue box and i was unable to click on any of the options in the dialogue box. What's...
Read more >Fix: Word Can't do This Because a Dialog Box is Open
Launch Word, and click on File. · Click Options. · Select Trust Center. · Click Trust Center Settings. · When the Trust Center...
Read more >Can't click buttons inside dialogue box. - Apple Community
Can't click buttons inside dialogue box. · 1. Shut down the Mac. · 2. Restart and immediately hold down the Shift key. ·...
Read more >Fix Command Cannot Be Performed Because a Dialog Box ...
... message saying that the Command cannot be performed because a dialog box is open. Click OK and then close open dialog boxes...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
app.print_control_identifiers()
will print all items that was found on window (or some area in window). in my opinion it used to be something likeinit_dlg.OK.click()
and notapp.init_dlg.OK.click()
Ok I’ll try that tonight and post results. I think you might be right, I just pulled some examples from the repo that might be outdated. Thanks for the suggestions.