I want to exit loop if the string give an error, I cant check if it's null.
The loop take 2 scripts and take all the cells, in the end the compiler give an error.
How i can exit before calculating the last string(the error time) ?
Thanks
String script3 = "return document.getElementsByTagName('g')[" + f9 + "].textContent";
n = (String) ((JavascriptExecutor) driver).executeScript(script3, hiddenDiv);
n
takes all the tags(g), at the end it's give an error not null, so i cant stop the loop.
I want to stop the loop before the error.
I do this to count the tags.