cancel
Showing results for 
Search instead for 
Did you mean: 

script extension is showing error 'aqFile' is undefined.

Highlighted
New Member

script extension is showing error 'aqFile' is undefined.

Hi,

I am using script extension where I want to include one .js file into another.

 

The master file is master.sj. it wants to acces generic.sj.

In master file I used the code like

 

'eval(aqFile.ReadWholeTextFile("C:\\Projects\\generic.sj", aqFile.ctANSI))'

 

I created the extesion but when I called the method of masterfile, TC showing me error "'aqFile' is undefined.".

 

And hence I am not able to call functions defined in  generic.sj.

 

Please suggest on this.

 

 

Tags (2)
1 REPLY 1
Highlighted
Community Manager

Re: script extension is showing error 'aqFile' is undefined.

 Hi,

 

Try reading the file via FileSystemObject object. You can find its description in the MSDN library. Here is a sample code:

var FS = Sys.OleObject("Scripting.FileSystemObject");
var str = FS.OpenTextFile(AFileName, 1).ReadAll();
---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Building with the Collaborator API

Help Documenation
The Collaborator API is a JSON-RPC API that lets you integrate with Collaborator 9.0 and above. For more information about how the API works, check out the API description here:


Sample Plugins
For an example of an add-in that uses the API, take a look at the Microsoft Word Add-in for Collaborator:


We list all the great plugins our network has already built on this page on the SmartBear website.

Labels