我有一个链接列表,它们正在增加一个我想采用该字符串类型的xpath并将其拆分到数字所在的位置,并且每次将该数字更改一次循环。如何在java中循环遍历一个已解析的字符串
String vPath= "/html/body/section/section[2]/a[1]";
//so the number that's changing is in the last bracket
String[] t = vPath.split("/a");
然后我想使用分割变量并循环遍历。所以也许使用for循环。不过,我似乎有一个问题,我该怎么做。我认为它应该像
For (int i=1; i < t(something here); i++{
then the code of clicking should go here
}
请帮忙。
是你正确的读一本书将帮助。谢谢! – Madi