Unable to get the object when the software is in (Not Responding) state
Hello beautiful people,
I am running to an issue that I am unable to get the 'Yes' button with the software that I am testing.
Basically, when I click a certain button in the current software, it will pop up another message window with 'Yes' or 'No' buttons.
However, when the message window is appeared, the software became (Not Responding) unless I click 'Yes' or 'No' buttons in the message window.
When I tried to get the object in the message window by recording the script, it's showing that below:
# Click 'Yes' button
NameMapping.Sys.Process("dwm").Window("Ghost", "ProgramName (Not Responding)", 1)
If I use Object Spy, then TC would hang until I manually click 'Yes' button in the message window, and then the software is out of Not Responding state.
Any suggestion?
About keys not working, don't use the testobject Keys but use the LLPlayer instead of.
This insert a WM_Key message directly in windows loop and thus by-pass any code restriction
So to send a real ENTER key press to system ;
LLPlayer.KeyDown(VK_RETURN, 5); LLPlayer.KeyUp(VK_RETURN, 5);
First parameter is virtual key code, list of them is here.
Second optional parameter is delay, better to use it to simulate real-life press which is not INSTANT.
BTW you can use the same for mouse message, so a left click is:
LLPlayer.MouseDown(MK_LBUTTON, xcoord, ycoord, 25); LLPlayer.MouseUp(MK_LBUTTON, xcoord, ycoord, 25);
First parameter is the mouse button.
Second and third parameters are coordinates.
Fourth parameter is delay, better to use it to simulate real-life press which is not INSTANT.
Be careful, the mouse or keyboard event is sent to the system and thus is treated by the currently active windows.
For a clik or a press, you need always to do both actions, down and up
For more information, search for LLPlayer in TC help.
Hope it helps.