[英]Instance of WebDriverWait method doesn't generates Template Proposals in Eclipse as before
我有一个小程序,应该单击某些内容然后等待。 不知何故,在输入点并等待后,我现在没有像以前那样得到建议(代码完成)。
这是程序的一小部分:
driver.findElement(By.id(StartRenderedButton)).click();
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.unt
这些进口我做了:
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
没有任何建议。
我尝试安装新的IDE,尝试在编辑器上进行更改>高级,但没有任何帮助。
我如何找回它?
首先,要打开/确保已在Eclipse IDE上启用自动建议,请转到
窗口>首选项> Java>编辑器>内容辅助>自动激活部分
并确保您具有以下设置:
0
.
专家提示:如果要在获取“。”时弹出所有字母的自动建议,请在Java的自动激活触发器中输入“ .abcdefghijklmnopqrstuvwxy
”。
其次,您需要一个WebElement引用来使用显式wait [= wait.until ...],例如,
WebDriver driver = new FirefoxDriver();
driver.get("http://somedomain/url_that_delays_loading");
WebElement myDynamicElement = (new WebDriverWait(driver, 10))
.until(ExpectedConditions.presenceOfElementLocated(By.id("myDynamicElement")
资料来源: seleniumhq -docs
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.