Instead of doing 2 steps:
wait.until(webDriver -> webDriver.findElement(By.id("userTable")));
and then retrieving the element when it's ready:
WebElement x = webDriver.findElement(By.id("userTable"));
can this be done in one step?
For instance,I don't want to do :
wait.until(webDriver -> webDriver.findElement(By.id("userTable")).findElement(By.xpath(".//*[@id=\"userTable\"]/tbody/tr/td[1]/a"))).click();
but would like to break it down into steps because it's clearer:
That is first wait fo it to be ready:
wait.until(webDriver -> webDriver.findElement(By.id("userTable")));
then get a reference to it:
WebElement x = webDriver.findElement(By.id("userTable"));
and then get the child element:
x.findElement(By.xpath(".//*[@id=\"userTable\"]/tbody/tr/td[1]/a"))).click();
So can the wait and getting the reference parts be somehow joined in one step?