I have a special requirement... While testing a GUI application, it sometimes pops up various unexpected windows :( In order to keep everybody happy I want to implement a kind of interactive testing framework.
I am already wrapping each GUI operation and assertion in a retry mechanism, hence everything is retried several times before giving up.
I can add a fallback to this mechanism to popup some message box or wait for a keystroke in order to continue. This will give the tester/developer a chance to rectify the misbehaving application and continue the test instead of relaunching it.
I am constrained to use .NET Core 2.1 --
- Is there any way to popup a simple yes/no message box? As far as I remember from Win32 days it is just a calling one function https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox
- Is it possible to somehow get around the annoying console capturing behaviour of NUnit? I was able to make Console.Write work immediately but Console.ReadLine is just getting stuck :( https://github.com/nunit/nunit/issues/1139
TIA, Adrian
After more digging...
will display a yes/no popup :)