I have a scenario where I need to add new username everytime is run the script. For instance, if the last time I had added a name as test1, then next time when I add another name I should not add test1 since it is already added instead I should add test2.
Incrementing the text is fine I have used the below script
String user_id = AppXPathsConstants.user_id; num++;
But my question is how to find that test1 already exists then add test 2 then after adding test2 I need to add test3 since test2 already exists.