RAutomation:自动化

  • N6_963598
    了解作者
  • 972.4KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-18 05:35
    上传日期
自动化 网址: : 作者:Jarmo RAutomation是一个小巧易用的库,可帮助自动执行窗口及其控件以进行自动化测试。 RAutomation提供: 易于使用和用户友好的API(受启发) 跨平台兼容性 易于扩展-只需编写少量脚本即可添加对尚不支持的平台或技术的支持 用法 require "rautomation" window = RAutomation::Window.new(:title => /part of the title/i) window.exists? # => true window.title # => "blah blah part Of the title blah" window.text # => "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultrici
RAutomation-master.zip
内容介绍
# RAutomation [![Gem Version](https://badge.fury.io/rb/rautomation.png)](http://badge.fury.io/rb/rautomation) * Web: http://www.github.com/jarmo/RAutomation * Author: Jarmo Pertman [jarmo@jarmopertman.com](mailto:jarmo@jarmopertman.com) RAutomation is a small and easy to use library for helping out to automate windows and their controls for automated testing. RAutomation provides: * Easy to use and user-friendly API (inspired by [Watir](http://www.watir.com)) * Cross-platform compatibility * Easy extensibility - with small scripting effort it's possible to add support for not yet supported platforms or technologies ## USAGE require "rautomation" window = RAutomation::Window.new(:title => /part of the title/i) window.exists? # => true window.title # => "blah blah part Of the title blah" window.text # => "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ultricies..." window.text_field(:class => "Edit", :index => 0).set "hello, world!" button = window.button(:value => "&Save") button.exists? # => true button.click all_windows = RAutomation::Window.windows all_windows.each {|window| puts window.hwnd} window = RAutomation::Window.new(:title => /part of the title/i) windows = window.windows puts windows.size # => 2 windows.map &:title # => ["part of the title 1", "part of the title 2"] window.windows(:title => /part of other title/i) # => all windows with matching specified title window.buttons.each {|button| puts button.value} window.buttons(:value => /some value/i).each {|button| puts button.value} window2 = RAutomation::Window.new(:title => "Other Title", :adapter => :autoit) # use AutoIt adapter # use adapter's (in this case AutoIt's) internal methods not part of the public API directly window2.WinClose("[TITLE:Other Title]") Check out [the documentation](https://rubydoc.info/github/jarmo/RAutomation) for other possible usages! ## INSTALL ### Windows gem install rautomation Available adapters: * :win_32 - uses Windows API directly with FFI (default) * :ms_uia - an experimental adapter * :autoit - uses AutoIt for automation (DEPRECATED) When using AutoIt adapter: You might need administrative privileges if running for the first time and you haven't installed AutoIt before! ### Linux Feel yourself at home on Linux and know how to automate windows and their controls? I would be happy if you'd contact me about that matter - or even better, follow the instructions at "How to create a new adapter?" ### OS X Feel yourself at home on OS X and know how to automate windows and their controls? I would be happy if you'd contact me about that matter - or even better, follow the instructions at "How to create a new adapter?" ### Others Feel yourself at home on some operating system not listed in here and know how to automate windows and their controls? Does Ruby also work on that operating system? I would be happy if you'd contact me about that matter - or even better, follow the instructions at "How to create a new adapter?" ## Supported Ruby Platforms Currently only 32bit Ruby is supported. 64bit versions **do not work** at all! ## How to create a new adapter? 1. Fork the project. 2. Create entry point file to lib/rautomation/adapter which should load all adapter specific files. 3. Add `autoload` statement into lib/rautomation/adapter/helper.rb for that file. 4. Create a directory for your adapter's specific code into lib/rautomation/adapter 5. Copy button.rb, text_field.rb and window.rb from some of the existing adapter's directory. 6. Add spec data for your adapter into spec/spec_helper DATA constant. 7. Use environment variable *RAUTOMATION_ADAPTER* to point to that adapter. 8. Start coding and spec-ing until as much of possible of the public API is satisfied. 9. Make me a pull request. Don't forget to fix the documentation for that adapter also! In case of any problems, feel free to contact me. ## Contributors * Levi Wilson - https://github.com/leviwilson * Eric Kessler - https://github.com/enkessler * Stephan Schwab - https://github.com/snscaimito ## Libraries Using RAutomation * [watir-classic](https://github.com/watir/watir-classic) * [mohawk](https://github.com/leviwilson/mohawk) ## Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. ## Copyright Copyright (c) Jarmo Pertman. See LICENSE for details.
评论
    相关推荐
    • 广州博控自动化ARM9000模块使用说明.zip
      广州博控自动化ARM9000模块使用说明zip,广州博控自动化ARM9000模块使用说明
    • 游戏加载自动化源代码
      游戏加载自动化源代码 index.htm是主页,代码简洁。 采用js,css代码 大部分代码是从网上搜集到进行改编的。 配有加载条,视频框架,全屏,下载功能。 附赠:植物大战僵尸
    • 清华大学自动化ARM培训教材.pdf
      清华大学自动化ARM培训教材 “嵌入式系统”作为自动化科学的一门理论与实际密切结合的,只是与技术含量较高的综合性专业课程,必将随着信息产业的发展而逐渐趋于成熟。
    • 基于ARM的家庭自动化系统的研究
      基于ARM的家庭自动化系统的研究,这个资料详细说明ARM自动化方面的应用!
    • 清华大学自动化ARM培训教材
      清华大学自动化ARM培训教材清华大学自动化ARM培训教材清华大学自动化ARM培训教材
    • arm android 自动化抓包工具包
      arm android 端自动化抓包工具,按顺序运行批处理即可,前提要装wireshark,并放到PATH目录下;
    • Cyber​​punk2077自动化
      该机器人利用了许多错误 赛博朋克2077游戏中的无题18绘画错误。 重复项 Craft.ioArmodillo 克伦兹科夫速度故障 修补程序1.11仍然有此错误。 但是CD Projects知道这一点。 有关此错误的更多信息,请 ...
    • 清华大学自动化ARM培训教材
      第一章 嵌入式系统的硬件构成第二章 操作系统第三章 嵌入式Linux 第四章 交叉编译第五章 嵌入式Linux 的软件开发环境第六章 设备驱动程序
    • 清华大学自动化ARM培训教材
      清华大学自动化ARM培训教材,很不错的参考资料
    • SIM800C_MQTT.rar
      使用SIM800C模块,使用MQTT协议,连接中国移动onenet平台,能实现数据的订阅、发布、存储等