1
public WebElement waitFindElement(By by) {
WebDriverWait wait = new WebDriverWait(driver, 5000);
wait.until(ExpectedConditions.presenceOfElementLocated(by));
return driver.findElement(by);
}
public void clickOrigem() {
driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.MINUTES);
WebElement opcaoOrigem = util.waitFindElement(By.xpath(".//*[text()='Sua empresa']"));
openSite.highlightElement(opcaoOrigem);
opcaoOrigem.click();
}
public void clickSubMenuContas() {
pagPrincipal.clickOrigem();
}
我找不到元素,它給NullPointerException
。NUllPointerException元素webdriver