When I test a pop up which type is ControlType.Window and acctually it's MessageBox from:
MessageBox.Show(message, caption,
MessageBoxButtons.YesNo,
MessageBoxIcon.Question);
Now I want press the Yes button, but cannot capture button yes and then I tried use enter kyboard as below code, tab input is works fine but enter input not working.
var AddRemoveFlagsForm = uiHelper.FindUIElement(null, "MessageBoxDialog");
var window = AddRemoveFlagsForm.AsWindow();
window.SetForeground();
TestingWait.ForSecond(5, "Wait for continue button");
Keyboard.Press(VirtualKeyShort.TAB);
TestingWait.ForSecond(5, "Wait for continue button");
Keyboard.Press(VirtualKeyShort.TAB);
TestingWait.ForSecond(5, "Wait for continue button");
Keyboard.Press(VirtualKeyShort.ENTER);
When I test a pop up which type is ControlType.Window and acctually it's MessageBox from:
Now I want press the Yes button, but cannot capture button yes and then I tried use enter kyboard as below code, tab input is works fine but enter input not working.