Forum Discussion

dmacknight's avatar
dmacknight
Occasional Contributor
9 years ago

missing variable in jscript

Hi,

I am recording test scripts using Jscript and have run into a problem. The application I'm testing is able to create new or open files. When I try to create new, it opens a standard Windows Save As window where I can enter the new file name. When I run the new script, it is failing. I looks like it is using a variable that is not getting declared. I simple sample script is below. If I add var ComboBoxEx32; in the variables list, it will run fine. Why is this variable not getting added when I record the script?

 

Thanks,

Dave

 

function Test1()

{

var sensorWorks;

var dlgNew;

var manageJob;

TestedApps["SensorWorks"]["Run"]();

sensorWorks = Aliases["SensorWorks"];

sensorWorks["SensorWorksMain"]["MainMenu"]["Click"]("Project|New");

dlgNew = sensorWorks["dlgNew"];

dlgNew["ComboBoxEx32"]["SetText"]("test1");

dlgNew["btnOpen"]["ClickButton"]();

manageJob = sensorWorks["ManageJob"];

manageJob["textBoxJobNumber"]["SetText"]("213456");

manageJob["buttonOk"]["ClickButton"]();

}

 

  • dmacknight's avatar
    dmacknight
    9 years ago

    This was resolved. I had Enable Windows Store enabled. Once I unchecked this, the problem went away

  • dmacknight's avatar
    dmacknight
    Occasional Contributor

    This is now seems to be working without the var declaration. don't know why. I did use Object Browser to look for the object but I don't see how that could affect it.

     

    Thanks,

    • dmacknight's avatar
      dmacknight
      Occasional Contributor

      This was resolved. I had Enable Windows Store enabled. Once I unchecked this, the problem went away