RobotFrameWork基本语法练习

1、基本使用如下图

2、运行日志如下(可对照查看语句输出)

Starting test: Test.Test Suite.test_case1
20180810 15:48:58.525 :  INFO : ${SrcURL} = 360
20180810 15:48:58.526 :  INFO : @{listScore} = [ 50 | 62 | 90 ]
20180810 15:48:58.529 :  INFO : 50
20180810 15:48:58.531 :  INFO : 62
20180810 15:48:58.532 :  INFO : 90
20180810 15:48:58.535 :  INFO : Repeating keyword, round 1/3.
20180810 15:48:58.536 :  INFO : 2
20180810 15:48:58.537 :  INFO : Repeating keyword, round 2/3.
20180810 15:48:58.537 :  INFO : 2
20180810 15:48:58.538 :  INFO : Repeating keyword, round 3/3.
20180810 15:48:58.539 :  INFO : 2
20180810 15:48:58.542 :  INFO : Repeating keyword, round 1/3.
20180810 15:48:58.543 :  INFO : 4
20180810 15:48:58.543 :  INFO : Repeating keyword, round 2/3.
20180810 15:48:58.544 :  INFO : 4
20180810 15:48:58.545 :  INFO : Repeating keyword, round 3/3.
20180810 15:48:58.546 :  INFO : 4
20180810 15:48:58.548 :  INFO : Repeating keyword, round 1/3.
20180810 15:48:58.549 :  INFO : 6
20180810 15:48:58.550 :  INFO : Repeating keyword, round 2/3.
20180810 15:48:58.551 :  INFO : 6
20180810 15:48:58.551 :  INFO : Repeating keyword, round 3/3.
20180810 15:48:58.552 :  INFO : 6
20180810 15:48:58.555 :  INFO : Exiting for loop altogether.
20180810 15:48:58.557 :  INFO : ${testURL} = https://www.so.com/
20180810 15:48:58.558 :  INFO : Opening browser 'chrome' to base url 'https://www.so.com/'
20180810 15:49:04.423 :  INFO : Typing text 'Robot FrameWork' into text field 'id=input'
20180810 15:49:04.724 :  INFO : Clicking button 'xpath = //*[@id="search-button"]'.
20180810 15:49:07.055 :  INFO : Current page contains text 'Robot Framework自动化测试(一)---第一个脚本- 虫师- 博客园'.
20180810 15:49:09.057 :  INFO : Slept 2 seconds
Ending test:   Test.Test Suite.test_case1

3、注意事项

 4、Edit界面下常用的几个快捷键

(1)Ctrl + C 复制选中单元格

(2)Ctrl + D 删除选中行

(3)Ctrl + i 前面插入一行

(4)Ctrl + 3 注释选中行

(5)Ctrl + 4 取消注释

(6)Alt + ↑/↓ 上下移动选中行

(7)按住Ctrl键,点击关键字可以显示其帮助信息(点击帮助信息,信息框可弹出)

 

posted on 2018-08-10 16:08  一個未来  阅读(3494)  评论(0编辑  收藏  举报

导航