"The current scope already contains a variable of the name locator2"
I’ve seen this errors quiet few times before and have always been able to fix it by removing the duplicate def for the variable.
However, this time I have removed the duplicate from this test case but it still keeps complaining. I’ve searched the file/testcase but can’t find another
reference of locator2. I’ve closed and reopened Katalon. I’ve deleted bin, libs, .classpath, and project folders but I’m still getting the same error.
It’s a long test case so I don’t want to delete and retype it.
Are you changing the data type of “locator2”? In other words, are you using “locator2” to contain an Integer at one time and then a String at another? Or any other two data types. You cannot do that. The data type you define it the first time is how it needs to stay (within the variable’s scope).
Or you can change the locator2 variable name anytime it is on the left hand side of an assignment (equate) statement to see which line is causing the concern.