Forum Discussion

BillA603's avatar
BillA603
Contributor
7 years ago

Path to XLS Input file lost after Convert to Script

 

I am using TestComplete 12.5.4142.7 x86 with a Windows Desktop application on Windows 10.

 

I recorded a simple Keyword Test - launch application, enter user credentials, login, exit application. I selected all of the steps of my Keyword test and used right-click selection Make Loop to create a Data Driven loop with my input XLS containing user credential data. This Keyword test executes fine, however, I need to add some logic to allow conditionally skipping users depending on values in other columns of the XLS so I decided to convert the Keyword test to VbScript..

 

I selected the Keyword test in the left pane [project explorer], right-clicked and selected Convert to Script [vbscript in my case]. When I attempt to execute the vbscript, I get the following error. The Microsoft Access database engine could not find the object 'opts_users$'. Make sure the object exists and that you spell its name and the path name correctly. 

NOTE: opts_users is the sheet name in my XLS file.

 

The TestComplete Support folks indicated I must have moved my XLS file. I did not. The Keyword test still executes fine, but the VBscript always fails with this error.

 

I believe that Convert to Script is misinterpreting the path to my XLS.

 

Has anybody else experienced this?

 

  • Hi Shehnaz,

     

    This kind of errors occurs because the DB engine cannot find the target file. The most probable reason for this error is addressing a file which doesn't exist (an incorrect file path). Another possible reason is an attempt to read a locked file.

    Please double-check that you are addressing the file correctly in your project and make sure that the target file is not locked (e.g., already opened by you or another user) when you run your tests.

     

    Could you please check this?

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Please post the script code that generates the error.  It could be as you said that something is not converting well.  It will be helpful to see how it converted.

    • Shehnaz's avatar
      Shehnaz
      Occasional Contributor

      I am experiencing the same issue when converting Keyword test into script code.

      Getting below error -

      "The Microsoft Access database engine could not find the object 'IE$'. Make sure the object exists and that you spell its name and the path name correctly. If 'IE$' is not a local object, check your network connection or contact the server administrator 9:49:07 Normal 0.00"

       

      I am using Test Complete Version: 14.0.317.7 x64 and using JavaScript as scripting language.

       

      Below is the script code -

      function FourEyes_NonSync_IE()
      {
      Project.Variables.DataLoop_FourEyes_NonSync_IE.Reset();
      for(; !Project.Variables.DataLoop_FourEyes_NonSync_IE.IsEOF();)
      {
      Browsers.Item(btIExplorer).Run(Project.Variables.PITA_test);

      Aliases.browser.BrowserWindow.Close();
      Project.Variables.DataLoop_FourEyes_NonSync_IE.Next();
      }
      }

       

      Please help.

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi Shehnaz,

         

        This kind of errors occurs because the DB engine cannot find the target file. The most probable reason for this error is addressing a file which doesn't exist (an incorrect file path). Another possible reason is an attempt to read a locked file.

        Please double-check that you are addressing the file correctly in your project and make sure that the target file is not locked (e.g., already opened by you or another user) when you run your tests.

         

        Could you please check this?