Forum Discussion

hiepwork08's avatar
hiepwork08
Contributor
3 years ago
Solved

Scripts to accept parameters when called from keyword tests

Hi,

I want to create a script whereby it takes in parameters, e.g.

 

function IsCheckBoxEnabled (String Label, Object LabelObj)

{

 ....

 return bool;

}

 

I then want to invoke IsCheckBoxEnabled from a keyword test and pass in the two input variables.

Question: I want to pass as input parameters from object properties of the application under test.

 

I am running in issues where TestComplete fails the syntax check for the IsCheckBoxEnabled. It's not happy with the input parameters bit.

If I change it to:

 

function IsCheckBoxEnabled()

{

}

 

Then the syntax passes.

 

Any ideas?

 

  • I have solved this one.

    it doesnt need the type.

    correct syntax is just:

    function IsCheckBoxEnabled (Label, LabelObj)

    {

    }

1 Reply

  • I have solved this one.

    it doesnt need the type.

    correct syntax is just:

    function IsCheckBoxEnabled (Label, LabelObj)

    {

    }