kevin_kapell
9 years agoFrequent Contributor
Started getting error "Variable uses an Automation type not supported in JScript"
I just started getting the following error when running my scripts.
Variable uses an Automation type not supported in JScript
This is my code that fails on the line "var resultvalue = aqString.Find(FullString,SearchValue,0,false);"
function CompareInString(FullString,SearchValue){
//This function will look for a string in another string.
//If match will log a Pass messsage.
//If don't match will log a Error message
Log.Event("function CompareInString")
var resultvalue = aqString.Find(FullString,SearchValue,0,false);
if (resultvalue == '-1'){
Log.Error("The value, " + SearchValue + ", was not found in the string, " + FullString)
}
else{
Log.Checkpoint("The value, " + SearchValue + ", was found in the string, " + FullString)
}
}
//This function will look for a string in another string.
//If match will log a Pass messsage.
//If don't match will log a Error message
Log.Event("function CompareInString")
var resultvalue = aqString.Find(FullString,SearchValue,0,false);
if (resultvalue == '-1'){
Log.Error("The value, " + SearchValue + ", was not found in the string, " + FullString)
}
else{
Log.Checkpoint("The value, " + SearchValue + ", was found in the string, " + FullString)
}
}
This has been working until today.
Running on browser IE 11
TestComplete Ver 12.0.122.7
This was my mistake - I was passing a null value to the FullString variable.