Forum Discussion
smcmickle
13 years agoContributor
Not sure if this is what you mean but... This is what I would do::
var str="Automation Test 1";
function myFunction()
{
var n=str.slice(15,str.length);
// Slices right where the number is, with the number being any amount of digits.
Now, I'm a newby at JScript, but depending on your method of submission, upon submission, just do this ::
n++;
Then to change the string to the next string name::
str = "Automation Test " + n;
}
CAKE :-)
var str="Automation Test 1";
function myFunction()
{
var n=str.slice(15,str.length);
// Slices right where the number is, with the number being any amount of digits.
Now, I'm a newby at JScript, but depending on your method of submission, upon submission, just do this ::
n++;
Then to change the string to the next string name::
str = "Automation Test " + n;
}
CAKE :-)