I want check a Delphi XE5 application. On a form are some TsEdit controls. But i can't send a text to this. Why?
The Log: Finding process SAS, No. 1 Evaluating description to find control... Retrieved control : Window Handle 12780248, Window Class Edit, "" <------- it shoud be possible to send text Sending text to control: test An error occured : Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. <------- Error! Why ???
Typically this message would occur if the control in question does not have a Windows Handle (or exposes a WinControl property). Its this property which is required to call the SendText or SendKeys command on.
I do not understand that. The control was recognized and received a handle (Window Handle 12780248).
In other forms, it works fine. For example:
Finding process SAS, No. 1 Evaluating description to find control… Retrieved control : Window Handle 4587968, Window Class Edit, “” Sending text to control: 22848 Done.
What type of application is it, VCL or FMX? What as a TsEdit control (not a standard control)? Not all controls support sendkeys. The gui automation feature in Automise is very basic, it does not work with all applications/control types (generally only those with a window handle).
This is an VCL Application. In all cases it is a TsEdit Control. It’s am member from TEdit (TsEdit = class(TEdit)). In one form it works fine an in another form i’ m getting an error while a handle is available.
A solution to the problem I’ve found. First, I create a mouse click on the control and can then enter the text there.