scsvel
14 years agoFrequent Contributor
TestComplete - Script Extension problem
Hi guys,
I am on the way of creating a TestComplete Script Extension file and am having problems. Here is the details i tried...
Test1.JS
1. function TestClass1(){
2. var a;
3. var b;
4. function add(){
5. var c;
6. c = a + b;
7. }
8. function sub(){
9. var c;
10. c = a - b;
11. }
12. }
13. function Start(){
14. var ins = new TestClass1();
15. return ins;
16. }
Description.XML
<?xml version="1.0" encoding="UTF-8"?>
<ScriptExtensionGroup Name = "MyExts">
<Category Name="Runtime Objects">
<ScriptExtension Name = "TestClass1 Object" Author = "Shanmugavel" Version = "1.0 test" HomePage = "www.automatedqa.com">
<Script Name = "Test1.js" InitRoutine = "Start">
<RuntimeObject Name = "TestClass1">
<Method Name = "add" Routine = "add">Add method</Method>
<Method Name = "sub" Routine = "sub">Sub method.</Method>
<Description>
Provides access to the TestClass1 methods
</Description>
</RuntimeObject>
</Script>
<Description>
Provides access to the TestClass1 methods
</Description>
</ScriptExtension>
</Category>
</ScriptExtensionGroup>
I am having these above files in folder C:\MyExts\Ext1 and I added MyExts folder in Engines-->Script Extensions under Tools-->Options dialog. After I created a new unit and typed Test. So CodeCompletion feature lists my TestClass1 but after that no methods listed out under that TestClass1. It shows error in Test1.JS file in line 14 Column 1.
Any ideas?
I am on the way of creating a TestComplete Script Extension file and am having problems. Here is the details i tried...
Test1.JS
1. function TestClass1(){
2. var a;
3. var b;
4. function add(){
5. var c;
6. c = a + b;
7. }
8. function sub(){
9. var c;
10. c = a - b;
11. }
12. }
13. function Start(){
14. var ins = new TestClass1();
15. return ins;
16. }
Description.XML
<?xml version="1.0" encoding="UTF-8"?>
<ScriptExtensionGroup Name = "MyExts">
<Category Name="Runtime Objects">
<ScriptExtension Name = "TestClass1 Object" Author = "Shanmugavel" Version = "1.0 test" HomePage = "www.automatedqa.com">
<Script Name = "Test1.js" InitRoutine = "Start">
<RuntimeObject Name = "TestClass1">
<Method Name = "add" Routine = "add">Add method</Method>
<Method Name = "sub" Routine = "sub">Sub method.</Method>
<Description>
Provides access to the TestClass1 methods
</Description>
</RuntimeObject>
</Script>
<Description>
Provides access to the TestClass1 methods
</Description>
</ScriptExtension>
</Category>
</ScriptExtensionGroup>
I am having these above files in folder C:\MyExts\Ext1 and I added MyExts folder in Engines-->Script Extensions under Tools-->Options dialog. After I created a new unit and typed Test. So CodeCompletion feature lists my TestClass1 but after that no methods listed out under that TestClass1. It shows error in Test1.JS file in line 14 Column 1.
Any ideas?