Hi,
I am working on a process that uses the SAP Business One application and I noticed that the command Send Key isn't sending the TAB key correctly, since it doesn't affect the the application at all. Other keys, seem to work fine. If I manually press the Tab key, the application responds accordingly, but not when the robot does it. I tried using the legacy option with different versions, but errors occur.
Using the default mode does not return any errors, but doesn't work:
sendKeys --keys "{TAB}"
Error using Legacy mode V1:
System.Exception: Specified method is not supported.
at yNUcJTg3Yn4P82uQ7l.j5L9nLkN1n2oLBYQNV.SendKeys(String , Boolean , KeyboardEmulationModes , Boolean )
at WDG.Automation.Windows.SendKeysCommand.Execute(WindowsContext context)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at WDG.Automation.Language.ErrorHandler.m0nvU46Nja(Exception )
at WDG.Automation.Language.ErrorHandler.HandleExecutionExceptionIfNeeded(Exception exception, IAutomationCommand command)
at WDG.Automation.Language.CommandInterpreter.<Run>d__12.vQ7xHXNECMOJPEvfGI5(Object , Object , Object )
at WDG.Automation.Language.CommandInterpreter.<Run>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at WDG.Automation.Language.ScriptInterpreter.<RunCore>d__17.MoveNext()
Error using Legacy mode V2:
System.Exception: Specified method is not supported.
at yNUcJTg3Yn4P82uQ7l.j5L9nLkN1n2oLBYQNV.SendKeys(String , Boolean , KeyboardEmulationModes , Boolean )
at WDG.Automation.Windows.SendKeysCommand.Execute(WindowsContext context)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at WDG.Automation.Language.ErrorHandler.m0nvU46Nja(Exception )
at WDG.Automation.Language.ErrorHandler.HandleExecutionExceptionIfNeeded(Exception exception, IAutomationCommand command)
at WDG.Automation.Language.CommandInterpreter.<Run>d__12.vQ7xHXNECMOJPEvfGI5(Object , Object , Object )
at WDG.Automation.Language.CommandInterpreter.<Run>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at WDG.Automation.Language.ScriptInterpreter.<RunCore>d__17.MoveNext()
I tried many different things to use the Tab key and noticed that AutoHotkey is able to send the key correctly to the application, so my suggestion would be to add the same method AutoHotkey uses as an alternative mode for the Send Key command. More information about how the default option for SendKey in AutoHotkey works is available here and here SendInput function (winuser.h).
I'm open to suggestions as well.
Regards,
------------------------------
Vinicius Marques
------------------------------