I am wondering if there is a way in JAVA to recall and update argument of the method during the run. My problem is as below
class A
String a = "string that changes in time"; // it gets text from web element
String b = "string to compare";
B.conditionalWait(a.eqals(b));
class B
conditionalWait(boolean condition){
int numTries = 3;
Actions action = new Actions(driver);
while (numTries-- != 0){
if(condition) {
break;
} else {
action.pause(5000);
driver.navigate().refresh();
}
}
}
Does JAVA allows in any way to pull the new value of the string, that will changes after refresh of the page?
I do not event know if it is possible to implement it in this way as I want to
New contributor
Dawid Strynowicz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.