/**显示等待并返回元素
* @param driver
* @param locator
*/
public static WebElement showWait(WebDriver driver, final String locator)
{
return new WebDriverWait(driver, 10).until(new ExpectedCondition<WebElement>() {
public WebElement apply(WebDriver d) {
return d.findElement(By.id(locator));
}
});
} /**隐式等待
* @param driver
*/
public static void implicitWait(WebDriver driver) {
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
}

最新文章

  1. A*算法的原理 &lt;转&gt;
  2. 【转】Tomcat 的三种(bio,nio.apr) 高级 Connector 运行模式
  3. SQL 语句-partition by
  4. python中的装饰器
  5. 大型网站系统架构实践(四)http层负载均衡之haproxy实践篇(一)
  6. python利用or在列表解析中调用多个函数.py
  7. R语言记录程序运行的时间
  8. JavaScript跨域解决办法
  9. 【转】 C语言自增自减运算符深入剖析
  10. OSGi-开发环境的建立和HelloWorld(04)
  11. C++中const几中用法
  12. WCF Restful调用跨域解决方案
  13. mysql 5.7~默认sql_mode解读
  14. Myeclipse加载php插件
  15. 【题解】Luogu P4054 [JSOI2009]计数问题
  16. JS中的HTML片段
  17. Mysql 5.7 windows安装 zip安装
  18. PAT 1074 宇宙无敌加法器
  19. Docker背景介绍
  20. todocmvc的安装

热门文章

  1. NUMPY的学习之路(2)——索引,合并,分割,赋值
  2. Spring - 周边设施 - H2 数据库启动时写入数据
  3. iOS开发之使用 infer静态代码扫描工具
  4. 创建Maven project 提示pom.xml 首行错误
  5. Android学习05
  6. 卫哲VS投行女,秋后算账是阿里的企业文化吗?
  7. CodeBlocks17.12配置GNU GCC + 汉化
  8. leetCode练题——28. Implement strStr()
  9. Java入门笔记 06-常用类
  10. [BUUCTF 2018]Online Tool