- 要安装6个文件:
- python-2.7.1.msi(语言解析器用)
- wxPython2.8-win32-unicode-2.8.12.0-py27.exe(GUI界面,在python基础上开发出来的)
- robotframework-2.5.7.win32.exe(把语言识别为seleniumLibrary能识别的文件)
- robotframework-seleniumlibrary-2.7.win32.exe(seleniumLibrary包即类库包)
- robotframework-ride-0.35.1.win32.exe,(解析器,把seleniumLibrary包解析执行的文件,相当于Java中的JDK,C++中的SDK)
- JDK1.6以上(用于解析seleniumserver.jar)
- 运行案例编辑器RIDE:
- 通过文件启动(双击[dirPath]pythonLibsite-packages obotide下的__init__.py文件)
- 通过命令启动(运行->ride.py回车/确认)
- a/b 打开ride.py文件之后点击“运行(start)”按钮.
- 运行服务器selenium-server:
- 通过集成环境去启动(即批处理环境中运行);
- 通过命令行去启动:
cmd-> java –jar[dirPathpythonlibsite-packagesSeleniumLibrarylibselenium-server.jar
- 通过写号的bat文件去启动:D:wuxinpythonScripts下startSelenium.bat
(.bat文件内容:
@echo off
java -jar[dirPathpythonlibsite-packagesSeleniumLibrarylibselenium-server.jar
如果要在firefox环境下运行则为:
@echo off
java -jar[dirPathpythonlibsite-packagesSeleniumLibrarylibselenium-server.jar -userExtensions[dirPathpythonlibsite-packagesSeleniumLibrarylibuser-extensions.js -firefoxProfileTemplate[dirPathpythonlibsite-packagesSeleniumLibraryfirefoxprofile)
- 可以通过两种方式去找入口:
- 一种是通过Path(常用的);
- 另一种是通过JQuery方式。
- 遇到问题处理方式:
- 通过查看文档(user-guide)方式找方法;
- 通过查看源代码(package中去查看)方式找方法;
(package位置[dirPathpythonLibsite-packages obot)
- 通过网上搜索方式去找方法。
- 查找网页中的元素方法:
- 一种是火狐firefox通过firebug去找;
- 另一种方式是IE通过安装webDeveloper去找。
- selenium测试flex资料:
步骤:
1、Download and install Selenium RC
2、Download Selenium Flex API, and rebuild your Flex application with SeleniumFlexAPI.swc(最主要的就是
要重新编译你的swf文件,并加入相应的swc文件。)
地址:http://sourceforge.net/projects/seleniumflexapi/files/下载SeleniumFlex-API_0.2.5.zip,将里
面的SeleniumFlexAPI.swc文件编译到你的flex应用中!
3、Download FlashSelenium and add to your test project
flash-selenium.jar加入到项目中
4、Download FlexUISelenium and add to your test project
地址:http://flex-ui-selenium.googlecode.com/files/flex-ui-selenium-0.1.1.jar flex-ui-selenium-0.1.1.jar加入
到项目中
5、Write and run your test cases against your Flex applications
参考链接:
Flash Selenium :http://code.google.com/p/flash-selenium/
Flex UI Selenium:http://code.google.com/p/flex-ui-selenium/
Selenium Flex API:http://code.google.com/p/sfapi/