代码是这样的:
def elem = driver.findElement(By.xpath("//*[contains(.,'search_text')]")); if (elem == null) println("The text is not found on the page!");
代码是这样的:
def elem = driver.findElement(By.xpath("//*[contains(.,'search_text')]")); if (elem == null) println("The text is not found on the page!");