invoking tested object methods by script
Hi,
What I want is of the simpliest thing: being able to invoke tested object methods by script.
On my tested application side, I build the following example using Delphi:
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
published
function GetInteger: Integer;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
function TForm1.GetInteger: Integer;
begin
result := 1;
end;
end.
//////////////////////////////end delphi project ////////////////////////////////////
on my TestComplete project, I scripted this:
procedure Test;
var
Form: TForm;
i: Integer;
begin
Form := NameMapping.Sys.Process('Project1').VCLObject('Form1');
i := Form.GetInteger;
end;
//////////////////////////////end script project ////////////////////////////////////
When running the Test procedure, TestComplete stops on "Form.GetInteger", saying "The object with the specified attributes does not exist".
My question is "how to access tested object methods (procedures, functions) ?".
Note:
1. I read this -> http://support.smartbear.com/viewarticle/28188/.
2. I know that published properties are accessible