Difference between using Sys.Keys or TestObj.Keys
Hi,
I've inherited a test project that uses both Sys.Keys and TestObj.Keys methods to simulate keystrokes. For example:
Some units contain Call Sys.Keys("[F10]")
While others contain Call frmMenu.StripMainMenu.Keys("[F10]")
Are there any benefits over using object specific key presses over Sys.Keys?
I suspect that using Sys.Keys makes it easier to maintain tests if object names change but I'd like to know whether there are best practises to follow.
Thanks,
Dan
Hello dankh,
Sys.Keys(), sends the keystrokes to whatever is in the context.
TestObj.Keys(), sends the keystrokes to the TestObj, the benefit of this one is that you don't have to navigate to the TestObj to send the Keystrokes.
I hope this make it clear.
Regards,
Leandro de Araújo Souza