小白教程系列——使用selenium IDE录制脚本

使用selenium IDE录制第一个脚本:
1.firefox右上角,点击selenium IDE图标,进入selenium IDE界面;
小白教程系列——使用selenium IDE录制脚本_第1张图片
2.进入selenium IDE界面,首先会让选择要进行的操作,我们直接选择Record a new test in a new project;
小白教程系列——使用selenium IDE录制脚本_第2张图片
3.输入项目名称,点击ok;
小白教程系列——使用selenium IDE录制脚本_第3张图片
4.输入url,点击start recording;
小白教程系列——使用selenium IDE录制脚本_第4张图片
5.firefox会打开输入的url地址页面并进行录制;
小白教程系列——使用selenium IDE录制脚本_第5张图片
6.此时,对浏览器进行一系列的操作,selenium IDE会忠实的记录所有的操作,比如在搜索框中输入selenium并进行查询;
小白教程系列——使用selenium IDE录制脚本_第6张图片
7.结束录制。在selenium IDE界面右上角,有结束录制图标,点击它;
小白教程系列——使用selenium IDE录制脚本_第7张图片
8.输入test name,点击ok;
小白教程系列——使用selenium IDE录制脚本_第8张图片
9.导出录制的脚本。点test右边的三个点,选择export;
小白教程系列——使用selenium IDE录制脚本_第9张图片
小白教程系列——使用selenium IDE录制脚本_第10张图片
10.这里提供多种语言的脚本导出,选择需要导出的语言,然后点击export即可,我选择的是 Java JUnit;
小白教程系列——使用selenium IDE录制脚本_第11张图片
11.导出后的脚本内容如下:
小白教程系列——使用selenium IDE录制脚本_第12张图片

你可能感兴趣的:(小白教程系列,selenium)