String xpath = "//center/div";
I would like to manipulate the above string so that my resulting output inside the for loop is:
String new_xpath = "//center"
String var_xpath = "/div"
for(int i=0;i<5;i++)
String temp = //center/div[i]
I know I have to do something like:
String temp = new_xpah + var_xpath + [i]
I need the above structure so that I can loop inside all my ‘div elements’ to fetch data.
Do you mean: