I am making a code in which to wait time I use Thread.sleep(5000) the problem is that this makes the code very unstable and I wanted to know if there is any alternative for waiting within the same screen
I already used
WebDriverWait wait = new WebDriverWait(driver,360);
return wait.until(ExpectedConditions.elementToBeClickable(By.xpath(“soul”)));
and the implicit wait but this only works when changing the screen