学历代表过去、能力代表现在、学习力代表未来!

robotFramework学习笔记

上一篇 / 下一篇  2011-09-23 16:36:10 / 个人分类:软件测试相关

 
  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.exeseleniumLibrary包即类库包)
    5. robotframework-ride-0.35.1.win32.exe,(解析器,把seleniumLibrary包解析执行的文件,相当于Java中的JDKC++中的SDK
    6. JDK1.6以上(用于解析seleniumserver.jar

 

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

cmd-> java –jar[dirPath\python\lib\site-packages\SeleniumLibrary\lib\selenium-server.jar

  1. 通过写号的bat文件去启动:D:\wuxin\python\ScriptsstartSelenium.bat

.bat文件内容:

@echo off

java -jar[dirPath\python\lib\site-packages\SeleniumLibrary\lib\selenium-server.jar

如果要在firefox环境下运行则为:

@echo off

java -jar[dirPath\python\lib\site-packages\SeleniumLibrary\lib\selenium-server.jar -userExtensions[dirPath\python\lib\site-packages\SeleniumLibrary\lib\user-extensions.js -firefoxProfileTemplate[dirPath\python\lib\site-packages\SeleniumLibrary\firefoxprofile

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

(package位置[dirPath\python\Lib\site-packages\robot)

  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/

 


TAG:

测试人员 引用 删除 bobowyf   /   2016-06-03 16:31:42
lz,请问下,在ride中选择好案例点击start后无反应是怎么回事,急急急
测试人员 引用 删除 bobowyf   /   2016-06-03 16:31:04
lz,请问下,在ride中选择好案例点击start后无反应是怎么回事
测试人员 引用 删除 bobowyf   /   2016-06-03 16:30:57
5
测试人员 引用 删除 bobowyf   /   2016-06-03 16:30:56
5
~~IT 之旅~~ 引用 删除 simplezhuo   /   2012-09-06 23:31:32
非常抱歉,很久没有上来了,刚看见。。。
引用 删除 annaier_go   /   2012-08-02 14:53:39
楼上的问题我知道,你把打开默认程序改成用python编译器打开,不要默认用记事本打开就解决了。
qin_linda的个人空间 引用 删除 qin_linda   /   2012-07-26 19:18:59
LZ,请教个问题,我是个新手刚学这个框架python266.rar
 jython_installer_2.5.1.jar
 robotframework_2.5.5.win32.rar
 wxPython2.8-win32-unicode-2.8.11.0-py26.rar
 robotframework-ride-0.32.1.win32.rar
这些都安装好了,但run这个ride.py时,不能启动RIDE程序,而是打开记事本,
#!C:\Python27\python.exe

#  Copyright 2008-2009 Nokia Siemens Networks Oyj
#  
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#  
#      http://www.apache.org/licenses/LICENSE-2.0
#  
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.


import sys

from robotide import main

main(sys.argv[1:])
你知道如何解决不?急。。。。。
 

评分:0

我来说两句

simplezhuo

simplezhuo

得意之时谨记,一半命运还掌握在上帝手里;失意之时须知,一半命运还掌握在自己手里。

日历

« 2024-03-24  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 36358
  • 日志数: 124
  • 建立时间: 2011-02-13
  • 更新时间: 2017-03-08

RSS订阅

Open Toolbar