We have several scripts in place which runs fine on a physical machine using TC-7.52. Today we wanted to run them on another machine (Virtual) using Test Execute.
- Installed TestExecute on virtual machine and registered the product.
- Copied the scripts folder (*.pjs , *.mds files) to a shared a location
- Locate the path of the scripts and click on RUN.
This Threw an error "Active-X Component cannot create object: Excel.Application"
I wonder this could be the reason as my virtual machine hasn't got Microsoft Excel???.
1. If yes for the above, it is not possible for us to make Excel available in all the machines.
2. Please share with me the DO's and DONT's for running the scripts in Network mode using TestExecute on a virtual machine.
Yes, most likely the reason is that the machine where the TestExecute was launched doesn't have Excel, and it cannot be accessed with Sys.OleObject("Excel.Application").
Howewer AFAIK you can use DDT driver to work with excel while you don't have it on the test machine where TE is launched, but do have it on machine from which you opened the test project. In this case you won't be able to write data to excel, just to read it.
Or you can install eg Open Office Calc on machine you need, it is a freeware and can work with xls files, and then create functions for working with it using OpenOffice API ( via Sys.OleObject("com.sun.star.Servicemanager") )
You can connect eg to excel file C:\1.xls and read data from it in the following way (JScript):
<font class="small">Code:</font><hr /><pre>
var Driver = DDT.ExcelDriver("C:\\1.xls", "Sheet1");
for(i = 0; i < Driver.ColumnCount; i++)
There is enough info and examples in other scripting languages in help system