Im trying to click on a xpath target with a variable substition on it. but iTest is showing error while I type it in the code. Refer the screenshot below ![![alt text]] : /storage/temp/4292-htmlerror.png
The error is coming from the square brackets. To the iTest interpreter, square brackets are a precedence setting operation. Basically you're telling the iTest interpreter to evaluate "5" and "2" before doing anything else on the line. If you use this syntax, you need to escape the open and close square brackets like you did for the "\[$r\]". I'd also suggest that if you need to do substitution like this, you investigate using form maps. This will make this effort much easier and you'll have a more readable test script in the end.