1. selenium ide录制脚本 导入selenium rc java脚本
  2. 新建java项目。导入selenium-server-standalone-xxx.jar包    不需要其他的jar包 http://selenium-release.storage.googleapis.com/index.html selenium remote control java环境搭建与运行
  3. 启动服务:java -jar selenium-server-standalone-xxx.jar 一定要启动不能退出。
  4. 写main方法 运行。
  5. 坑:明确浏览器地址:写绝对地址:"*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"                                                           其他问题查看:http://blog.csdn.net/u011159607/article/details/53317489                                                                                                  由于录制的脚本运行较快有可能开不见效果,代码中插入用显示等待  thread.sleep();                       

相关文章: