My code in java only prints search half of the time when I use implicitlyWait() but when I use Thread.sleep() it always works. (The slider always ends up clicked) Why?
System.setProperty("webdriver.chrome.driver", "chromedriver.exe");
ChromeDriver driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
String minerAddress = "0fB3583c11320BB9c7F512e06ce9c3A9218568C9";
String ethermineURL = String.format("https://ethermine.org/miners/%s/dashboard", minerAddress);
driver.get(ethermineURL);
//Thread.sleep(5000);
String search = driver.findElement(By.xpath("//div[@class='active table-container']//tbody")).getText();
System.out.println(search);
driver.findElement(By.xpath("//div[@class='slider round']")).click();