JS Evaluate - Load JS script from File - encoding issue?
Posted: Mon Jul 20, 2020 3:49 pm
Hi Oleg,
We are trying to use the functionality to load a js file in a JS Evaluate action. So far we haven't been successful.
We are already using the JS Evaluate action today, either using a simple js statement directly in the field "Expression to evaluate" or adding a script with "Use Internal Script". But now we are trying to use "Load JS script from File" and it doesn't seem to work.
RoboTask finds the file and can access it: if we leave the file empty or the variable in the "Expression to evaluate" is not present in the script, RoboTask shows the corresponding error message. But it seems to be an encoding issue (we have tried UTF8, UTF8-BOM, UTF16, ANSII windows-1252, ANSII ISO-8859-1); even a file containing just containing var dummy="helloworld"; can't be read correctly. The generic error that we get is Error: Line number 1 (1) Invalid symbol
What can we do to read a simple js file?
Kind regards, Juanlu.
We are trying to use the functionality to load a js file in a JS Evaluate action. So far we haven't been successful.
We are already using the JS Evaluate action today, either using a simple js statement directly in the field "Expression to evaluate" or adding a script with "Use Internal Script". But now we are trying to use "Load JS script from File" and it doesn't seem to work.
RoboTask finds the file and can access it: if we leave the file empty or the variable in the "Expression to evaluate" is not present in the script, RoboTask shows the corresponding error message. But it seems to be an encoding issue (we have tried UTF8, UTF8-BOM, UTF16, ANSII windows-1252, ANSII ISO-8859-1); even a file containing just containing var dummy="helloworld"; can't be read correctly. The generic error that we get is Error: Line number 1 (1) Invalid symbol
What can we do to read a simple js file?
Kind regards, Juanlu.