0
How to click on a button from another application
I have a application (c#, wpf), that I want to test. I can test this application to a certain extent. I can send data to the application which the application will process. However. Sometimes the application needs user input. Like a click on a button in a dialog. How can I simulate this click on a dialog button ?
4 Antworten
+ 4
Call the function you registered onclick
+ 1
no way, (there is no legal way..) the fact is that each application runs in its own process, which is inaccessible from other processes, if it were possible, then there would be no protection, this would lead to chaos.
0
Can't do that It is a dll. That is showing the dialog. I do not have access to the onclick event.
0
Long long time ago. I have done it. Using winform and handle. You could search for a window and then analyse which button were on that window and click on a button. In wpf I have not seen it. https://docs.microsoft.com/en-us/answers/questions/702293/how-to-clicked-ok-button-of-messagebox-pops-up-on.html