Forum Discussion
3 Replies
- murugans1011Regular Contributorusing eval
//USEUNIT UnitName
function Test()
{
eval("UnitName['TestFunction']()");
}
Refer:http://support.smartbear.com/viewarticle/31618/ - anilqa10New Contributorhi Murugan
Thanks for your reply i will use the above method.
I am designing new automation framework using TestComplete c# scripting where
we write the script in excel file same like QTP keyword driven framework as shown below
TC_ID TC_NAME OBJECT_NAME ACTION INPUT_PARAMETERS
1 TEST Aliases["Test"]["UserName"] Set Anil
Aliases["Test"]["Password"] Set *******
in above scenario i will take object name in one variable say var a
and i would like to perform the operation like
var a
a=objWorksheet.cells(2,2) //Aliases["Test"]["UserName"]
a+".["SetText"]("Anil")"
can i perform above operation using eval function?
in VBSCRIPT we can use execute statement for this operation
Execute "a.["""SetText"]("""Anil""")"
i am new to TestComplete and c# scripting so i need help in implementing above operation. - anilqa10New Contributorhi Murugan,
Thanks for your reply i will use the above method.
I am designing new automation framework using TestComplete c# scripting where I need to write the script in excel file same like QTP keyword driven framework as shown below
TC_ID TC_NAME OBJECT_NAME ACTION INPUT_PARAMETERS
1 TEST Aliases["Test"]["UserName"] Set Anil
Aliases["Test"]["Password"] Set *******
in above scenario i will take object name in one variable say var a and i would like to perform the operation like
var a a=objWorksheet.cells(2,2) //Aliases["Test"]["UserName"]
a+".["SetText"]("Anil")"
can i perform above operation using eval function?
in VBSCRIPT we can use execute statement for this operation
Execute "a.["""SetText"]("""Anil""")"
i am new to TestComplete and c# scripting so i need help in implementing above operation