claudiaborges
4 years agoOccasional Contributor
How to stop the while loop
I need to close all the objects on a page (minus one) if they are present.
I am trying several ways to make a while loop on both keyword tests as in javascript, but they don't do what I want.
They do close all items but they run one more time to check if the item is present and it is not so they give an error. (and this is not an error, it should indeed stop)
the javascript was something like this (this one is not working)
function WhileWidgetExists()
{
var i = 1;
while (i > 3) {
iconDeleteWidget.Click();
i++;
if (i = 1) {
break;
}
}
}