百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
W

watir-classic

> 编程语言
开源

Watir Classic 已被淘汰。请使用基于 Selenium 的 Watir 6.0+

321 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

Watir Classic 已被淘汰。请使用基于 Selenium 的 Watir 6.0+

= Watir Classic

== Status

Watir Classic is now deprecated. Please use Watir 6.0+ which is based on Selenium. Update your dependencies to use "watir", "~> 6.0"

== Details

Watir Classic is a Watir[https://github.com/watir/watir] driver for automating Internet Explorer on Windows.

Project Home:: http://watir.com Documentation:: http://rubydoc.info/github/watir/watir-classic/frames Source Code:: http://github.com/watir/watir-classic Support:: http://watir.com/support Gem:: https://rubygems.org/gems/watir-classic

== Install

Install the gem:

gem install watir-classic

Detailed installation instructions are at http://watir.com/installation

== Examples

Some examples from http://watir.com/examples

Loading Watir gem to drive Internet Explorer on Windows

require 'watir-classic'

Starting a new browser & going to our site

browser = Watir::Browser.new browser.goto("http://bit.ly/watir-example")

Setting a text field

browser.text_field(:name => "entry.0.single").set "Watir"

Setting a multi-line text box

browser.text_field(:name => "entry.1.single").set "I come here from Australia. \n The weather is great here."

Setting and clearing a radio button

browser.radio(:value => "Watir").set browser.radio(:value => "Watir").clear

Setting and clearing check boxes

browser.checkbox(:value => "Ruby").set browser.checkbox(:value => "Python").set browser.checkbox(:value => "Python").clear

Clicking a button

browser.button(:name => "logon").click

Clearing, getting and selecting selection list values

browser.select_list(:name => "entry.6.single").clear puts browser.select_list(:name => "entry.6.single").options.map(&:text) browser.select_list(:name => "entry.6.single").select "Chrome"

Clicking a button

browser.button(:name => "submit").click

Checking for text in a page

puts browser.text.include?("Your response has been recorded.")

Checking the title of a page

puts browser.title == "Thanks!"

== Supported Platforms

Watir-Classic is supported on Ruby 1.8.7, 1.9.3 and 2.0.0. It should work on Internet Explorer 8, 9 and 10.

Let us know at {Watir's Mailing List}[https://groups.google.com/forum/?fromgroups#!forum/watir-general] or through {Issues}[https://github.com/watir-classic-issues] if there's any problems.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言