PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV (précédentes versions) → EmulateInput() does not recognize controls in a window from external component (WD24)
EmulateInput() does not recognize controls in a window from external component (WD24)
Débuté par Jacek, 07 avr. 2021 16:37 - Aucune réponse
Membre enregistré
4 messages
Posté le 07 avril 2021 - 16:37
After spending several frustrating hours, I need a workaround for a simple automatic test like this:
PROCEDURE MyScenario()
EmulateInput(WIN_RegVisitA_BOC.EDT_CargoCode,"{F5}")
//Scenario that will be run when opening
// the "cmp_wdWS50DictSQL.WIN_SelectCargo" window
ON "cmp_wdWS50DictSQL.WIN_SelectCargo" DO
EmulateInput("cmp_wdWS50DictSQL.WIN_SelectCargo.TABL_Cargo","{DOWN}{DOWN}{ENTER}")
END

After it is run at the end of the last line with a call to EmulateInput() a No Entry icon is displayed with a tooltip: "EmulateInput function called. Error caused by 1 parameter. The 'cmp_wdWS50DictSQL.WIN_SelectCargo.TABL_Cargo' control is unknown."

- cmp_wdWS50DictSQL is the external component.
- WIN_SelectCargo is the window from this component.
- TABL_Cargo is the control from this window (the one not recognized)

I have checked the spelling, besides the script was "recorded" not entered by hand.
Any help, suggestions, how to make EmulateInput() recognize controls in external components ?

Or may be the Automatic Testing of Windows in WD is just a time wasting shitty trap for suckers like me.

Thanks in advance
/Jacek