使用robot frame selenium中遇到的问题汇总
2016-09-09 14:16
357 查看
1、问题:robot运行时提示:[ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open"
现象:运行时打开浏览器后再浏览器的导航栏中无法数据url
解决方法:浏览器版本太高,降低浏览器版本
2、统计li(入下图)个数
<ul class="jqtree_common jqtree-tree" role="tree">
<li class="jqtree_common" role="presentation" aria-selected="false">
<li class="jqtree_common" role="presentation">
<li class="jqtree_common" role="presentation">
<li class="jqtree_common" role="presentation">
<li class="jqtree_common" role="presentation">
可用方法:
document.getElementsByTagName("li").length;
document.getElementsByClassName("jqtree_common").length;
ClassName:在统计时会把jqtree_common jqtree-tree也统计出,会导致统计时有问题,可根据项目特点进行减法,或根据项目进入判断,我目前去统计这个是去找相应的数据,可以根据找到的数据去判断,可判断下如果数据为空则进行一些处理
3、关于跳出整个循环和跳出当前循环的使用
continue for loop:跳出当前循环
Exit For Loop:跳出整个循环
*** Test Cases ***
test
:FOR ${i} in range 1 5
\ run keyword if ${i}==3 continue for loop #Exit For Loop
\ log ${i}
4、定义list @{i},使用时${i}
现象:运行时打开浏览器后再浏览器的导航栏中无法数据url
解决方法:浏览器版本太高,降低浏览器版本
2、统计li(入下图)个数
<ul class="jqtree_common jqtree-tree" role="tree">
<li class="jqtree_common" role="presentation" aria-selected="false">
<li class="jqtree_common" role="presentation">
<li class="jqtree_common" role="presentation">
<li class="jqtree_common" role="presentation">
<li class="jqtree_common" role="presentation">
可用方法:
document.getElementsByTagName("li").length;
document.getElementsByClassName("jqtree_common").length;
ClassName:在统计时会把jqtree_common jqtree-tree也统计出,会导致统计时有问题,可根据项目特点进行减法,或根据项目进入判断,我目前去统计这个是去找相应的数据,可以根据找到的数据去判断,可判断下如果数据为空则进行一些处理
3、关于跳出整个循环和跳出当前循环的使用
continue for loop:跳出当前循环
Exit For Loop:跳出整个循环
*** Test Cases ***
test
:FOR ${i} in range 1 5
\ run keyword if ${i}==3 continue for loop #Exit For Loop
\ log ${i}
4、定义list @{i},使用时${i}
相关文章推荐
- 视频监控(B/S模式下)CGI和BOA使用期间遇到的问题汇总
- REVIT使用中遇到的各种问题汇总
- 记录我遇到的使用selenium让人摸不着头脑的问题
- 使用WebDriver遇到的一些问题汇总
- CGI和BOA使用期间遇到的问题汇总(转)
- 视频监控(B/S模式下)CGI和BOA使用期间遇到的问题汇总
- 使用Google Map API可能会遇到的问题汇总
- 【汇总】iOS开发及Xcode使用中遇到的一些报错问题汇总
- 使用kettle工具遇到的问题汇总及解决方案
- 使用Selenium进行回归测试所遇到的问题
- 装好CGAL后,使用example遇到的问题汇总
- 使用10.04过程中遇到了很多中文问题,都解决了,汇总下来供大家参考
- tomcat使用遇到问题汇总
- asp.net c#.net项目中使用总结,遇到的各个问题的汇总
- 使用crosstool构建arm交叉编译链遇到的问题汇总
- CGI和BOA使用期间遇到的问题汇总
- flashdevelop使用中遇到的问题汇总
- selenium使用中遇到的问题
- Python 语言使用中遇到的问题汇总
- win8系统使用时遇到的常见问题汇总及解答