robotFramework学习笔记

  1. 要安装6个文件:
    1. python-2.7.1.msi(语言解析器用)
    2. wxPython2.8-win32-unicode-2.8.12.0-py27.exe(GUI界面,在python基础上开发出来的)
    3. robotframework-2.5.7.win32.exe(把语言识别为seleniumLibrary能识别的文件)
    4. robotframework-seleniumlibrary-2.7.win32.exe(seleniumLibrary包即类库包)
    5. robotframework-ride-0.35.1.win32.exe,(解析器,把seleniumLibrary包解析执行的文件,相当于Java中的JDK,C++中的SDK)
    6. JDK1.6以上(用于解析seleniumserver.jar)

 

  1. 运行案例编辑器RIDE:
    1. 通过文件启动(双击[dirPath]pythonLibsite-packages obotide下的__init__.py文件)
    2. 通过命令启动(运行->ride.py回车/确认)
    3. a/b 打开ride.py文件之后点击“运行(start)”按钮.
  1. 运行服务器selenium-server:
    1. 通过集成环境去启动(即批处理环境中运行);
    2. 通过命令行去启动:

cmd-> java –jar[dirPathpythonlibsite-packagesSeleniumLibrarylibselenium-server.jar

  1. 通过写号的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)

  1. 可以通过两种方式去找入口:
    1. 一种是通过Path(常用的);
    2. 另一种是通过JQuery方式。
  1. 遇到问题处理方式:
    1. 通过查看文档(user-guide)方式找方法;
    2. 通过查看源代码(package中去查看)方式找方法;

(package位置[dirPathpythonLibsite-packages obot)

  1. 通过网上搜索方式去找方法。
  1. 查找网页中的元素方法:
    1. 一种是火狐firefox通过firebug去找;
    2. 另一种方式是IE通过安装webDeveloper去找。
  1. selenium测试flex资料:

步骤:

      1Download and install Selenium RC

      2Download 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应用中!

      3Download FlashSelenium and add to your test project 

flash-selenium.jar加入到项目中

      4Download 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加入

 

到项目中

      5Write 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/

原文地址:https://www.cnblogs.com/simplezhuo/p/9676708.html