1. jsclick 也不管用

Actions action = new Actions(driver);
WebElement theRow = page.getInvisibleElement();
action.moveToElement(theRow).perform();
page.getInvisibleElement().click(); 或page.getInvisibleElement().click();再获取一遍theRow

2.Issue : Cannot get text of a hidden element, SeleniumUtil. scrollIntoView(element) also doesn’t work for the element

Solution :  JavaScript to get the text of hidden element.

Code :

WebElement tickerEl = el.findElement(By.cssSelector("td.auto-left"));

String tickerName = (String) ((JavascriptExecutor) driver).executeScript("return jQuery(arguments[0]).text();", tickerEl);

String tickTmp =StringUtils.trim(tickerName);

logger.info("Ticker : "+tickTmp);

3.Issue : Search function doesn't work sometime after we input the search condition, I guess it may cause by the realization method, the UI may only check the search condition each period of time,

If the input miss the check,  we need to input again

Solution : If the drop down list doesn’t display the first time after inputting search condition, clear it and input the search condition again

4.Issue : Cannot get text of the columns which doesn’t show out, we need to drag the scroll bar to make it display when do testing manually.

Solution :  Use SeleniumUtil.scrollIntoView(driver, el);

Code :

for (WebElement el : columns) {

if(!(el.isDisplayed())){

SeleniumUtil.scrollIntoView(driver, el);

}

logger.info("Column : " + el.getText());

… …

}

5.问题:元素定位方法没有错,但却定位不到元素

解决方法:发现网页有2个frame,需要定位的元素在左侧frame中,需要先跳转到左边的frame

代码:

6.问题:“确认”按钮通过class name或 css定位不到

解决方法:

通过xpath 定位,再点击

最新文章

  1. baiduMap
  2. 想通过加HINT让其走全表扫描
  3. LinQ的一些基本语句
  4. mini install centOS log
  5. php大力力 [025节] 来不及学习和分类的,大力力认为有价值的一些技术文章合集(大力力二叔公)(2015-08-27)
  6. SQLserver通过链接服务器连接oracle
  7. 【USACO 2.3.1】最长前缀
  8. HTML+CSS笔记 CSS中级 颜色&长度值
  9. uboot的relocation原理具体分析
  10. NFS 系统搭建 - 成功
  11. The history of programming languages.(transshipment) + Personal understanding and prediction
  12. fedora 28 重新生成 /boot/grub2/grub.cfg
  13. 导入gradle项目
  14. 登陆 全站 user
  15. nginx 之 proxy_pass详解
  16. IE10弹窗showModalDialog关闭之后提示SCRIPT5011:不能执行已释放的Script代码
  17. CListCtrl使用(转)
  18. Ubuntu 16.09下iptables通过raw表实现日志输出和调试
  19. IOZONE测试工具使用方法(转载)
  20. apk下载安装,存储的位置,路径

热门文章

  1. 简单div遮罩
  2. Ubuntu 16.04下在Shell终端下使用nautilus快速打开窗口文件夹
  3. linux svn配置hooks
  4. MySQL 为日期增加一个时间间隔
  5. install Python 2.7 and Python 3.3 on CentOS 6
  6. Material Theme
  7. BUPT复试专题—众数(2014)
  8. elasticsearch学习网站
  9. shell mysql 直接创建表
  10. docker 搭建linux samba