Selenium学习笔记一

上一篇 / 下一篇  2009-09-18 17:46:18 / 个人分类:软件测试

Selenium学习笔记一:

一、下载站点http://seleniumhq.org/download/下载Selenium的包。

二、下载Selenium IDESelenium RC的包。

三、环境要求:安装jdk1.5,下载Eclipse最新版本。

 

添加IDE插件:下载到后解压缩这两个包并将解压后的Selenium IDE插件添加进Firefox浏览器里。

 

启动Selenium RC sever,打开cmd,进入Selenium RC解压缩后的目录下的

..\selenium\selenium-remote-control-1.0.1-dist\selenium-remote-control-1.0.1\selenium-server-1.0.1目录下,使用命令java –jar selenium-server.jar启动Selenium RC sever

 

配置Eclipse:官网文章地址:http://seleniumhq.org/docs/appendix_installing_java_driver_client.html#configuring-selenium-rc-eclipse-reference

1.      打开Eclipse

2.      File->New->other,弹出框选择新建一个java project

3.      输入工程名,在jre中注意选择不低于jdk1.5的版本;

4.      注意接下来可以在libraries里面添加2个包:包括:selenium-server.jarselenium-java-client-driver.jar

5.      要注意要添加junitjar包,junitjar包路径:“\eclipse\plugins\org.junit_3.8.2.v20090203-1005”。如果不添加,可能到时候脚本无法执行。Eclipse配置中build path可以在project-java build path中,也可以在工程右键菜单-build path-configure build path

6.      此项配置完成后基本就完成了,可在工程的src文件夹下再建个com文件夹,再在下面建testcase文件夹。在后面的case中会用到import的包的路径。

 

明天再总结制作脚本和自动化实现刷票经验,:-


TAG:

 

评分:0

我来说两句

Open Toolbar