invalid left-hand side in assignment when changing value of cell
Hello and welcome to my forum post. I'd love some help and guidance with my current issue.
I get this error when running this test, basically what happens is that testcomplete doesn't want to change the value of the cell. In the test it takes a property of the web application. This beeing an article nummer. For example artikelnummer: IN12345. Then using the aqstring.Remove function, it removes the string part of this article nummer. So what is left is just the nummer (ie. 12345). This can then be used to compare to the article nummer in earlier instances. This worked fine when I wasn't using a table to store the article nummers. The reason I am now is because this seems like a practical solution for when theres multiple article numbers involed. (Whenever more than 1 item has been added to the checkout).
function TrimArtNum (ChkArtNumTrim){
Log.Message(ChkArtNumTrim);
var counter = Project.Variables.Counter;
//Project.Variables.ArtNumChkT.$set("Item", 0, 0, ChkArtNumTrim);
Project.Variables.ArtNumChkT.Item(0, counter) = aqString.Remove(ChkArtNumTrim,0,15);
Log.Message(Project.Variables.ArtNumChkT.Item(0, counter));
}
^The code where I get the error. Now I did some checking myself and from what I see on https://community.smartbear.com/t5/TestComplete-Questions/JavaScript-quot-ReferenceError-Invalid-left-hand-side-in/m-p/196706#M5376 and on https://support.smartbear.com/testcomplete/docs/scripting/specifics/javascript.html#indexed-properties.
The set variable function is required. I've tried messing around with that function but I don't seem to get it working.
Heres the keyword test that calls and uses the script.
Any help is apreciated.