Example: To display a modal window

Best practices, code snippets for common functionality, examples, and guidelines.
kentbarnett
Posts: 1
Joined: Tue May 18, 2021 10:43 am

Example: To display a modal window

Post by kentbarnett » Tue May 18, 2021 11:16 am

Hi everybody,

Recently, I needed to show a modal dialog window in an automated testcase: The system is not fully automated yet and the user has to perform a few Actions on another system before the test can proceed. onion.

Here is a part like this:pause-test-with-message-box-t12193.html but I need a window that is always in the foreground. I had some trouble creating a real modal window but with some Inspiration from here https://www.codeproject.com/Articles/18 ... MessageBox I finally did it.
My code is a quick hack; it opens a window, presents a text and automatically closes the window after a certain time elapses or if the 'OK' button is clicked.

Maybe this is helpful to you.