I'm coding Selenium scripts for automatically testing a signup process.
I have two variables that need to be incremented and stored to be used in future sessions so the scripts can be used again and again without these unique key items being re-used, which would generate an error.
Where I'm getting tripped up is that the primary variable I need to increment is on the front of a text string, not the back, so suffix++
won't work.
For various reasons I cannot explain logically, the emails MUST be formatted like this:
XXXXtest@email.com
So, let's say I'm starting with 1000test@email.com
, I'd want to increment to 1001test@email.com the next time the script is run.
I'm a relative newbie to Selenium (but not to automated testing) and -completely- without Javascript knowledge.