Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Executable specification of the Watir API
Ruby HTML
branch: master

Merge pull request #64 from watir/ruby_2

Update to Ruby 2.0
latest commit ebb65f492f
@p0deje p0deje authored
Failed to load latest commit information.
html Update to Ruby 2.0
lib Update to Ruby 2.0
.gitignore added tests for wait timer
LICENSE Bump year in copyright
README.markdown Update to Ruby 2.0
alert_spec.rb Update to Ruby 2.0
area_spec.rb Update to Ruby 2.0
areas_spec.rb Update to Ruby 2.0
browser_spec.rb Update to Ruby 2.0
button_spec.rb Update to Ruby 2.0
buttons_spec.rb Update to Ruby 2.0
checkbox_spec.rb Update to Ruby 2.0
checkboxes_spec.rb Update to Ruby 2.0
collections_spec.rb Update to Ruby 2.0
cookies_spec.rb Update to Ruby 2.0
dd_spec.rb Update to Ruby 2.0
dds_spec.rb Update to Ruby 2.0
del_spec.rb Update to Ruby 2.0
dels_spec.rb Update to Ruby 2.0
div_spec.rb Update to Ruby 2.0
divs_spec.rb Update to Ruby 2.0
dl_spec.rb Update to Ruby 2.0
dls_spec.rb Update to Ruby 2.0
drag_and_drop_spec.rb Update to Ruby 2.0
dt_spec.rb Update to Ruby 2.0
dts_spec.rb Update to Ruby 2.0
element_spec.rb Update to Ruby 2.0
elements_spec.rb Update to Ruby 2.0
em_spec.rb Update to Ruby 2.0
ems_spec.rb Update to Ruby 2.0
filefield_spec.rb Update to Ruby 2.0
filefields_spec.rb Update to Ruby 2.0
font_spec.rb Update to Ruby 2.0
form_spec.rb Update to Ruby 2.0
forms_spec.rb Update to Ruby 2.0
frame_spec.rb Update to Ruby 2.0
frames_spec.rb Update to Ruby 2.0
hidden_spec.rb Update to Ruby 2.0
hiddens_spec.rb Update to Ruby 2.0
hn_spec.rb Update to Ruby 2.0
hns_spec.rb Update to Ruby 2.0
iframe_spec.rb Update to Ruby 2.0
iframes_spec.rb Update to Ruby 2.0
image_spec.rb Update to Ruby 2.0
images_spec.rb Update to Ruby 2.0
ins_spec.rb Update to Ruby 2.0
inses_spec.rb Update to Ruby 2.0
label_spec.rb Update to Ruby 2.0
labels_spec.rb Update to Ruby 2.0
li_spec.rb Update to Ruby 2.0
link_spec.rb Update to Ruby 2.0
links_spec.rb Update to Ruby 2.0
lis_spec.rb Update to Ruby 2.0
map_spec.rb Update to Ruby 2.0
maps_spec.rb Update to Ruby 2.0
meta_spec.rb Update to Ruby 2.0
metas_spec.rb Update to Ruby 2.0
modal_dialog_spec.rb Update to Ruby 2.0
ol_spec.rb Update to Ruby 2.0
ols_spec.rb Update to Ruby 2.0
option_spec.rb Update to Ruby 2.0
p_spec.rb Update to Ruby 2.0
pre_spec.rb Update to Ruby 2.0
pres_spec.rb Update to Ruby 2.0
ps_spec.rb Update to Ruby 2.0
radio_spec.rb Update to Ruby 2.0
radios_spec.rb Update to Ruby 2.0
screenshot_spec.rb Change from RSpect should syntax to expect syntax. Also from == to eq…
select_list_spec.rb Update to Ruby 2.0
select_lists_spec.rb Update to Ruby 2.0
span_spec.rb Update to Ruby 2.0
spans_spec.rb Update to Ruby 2.0
spec_helper.rb Add SilentLogger to silence WEBrick once and for all. Closes #29.
strong_spec.rb Update to Ruby 2.0
strongs_spec.rb Update to Ruby 2.0
table_nesting_spec.rb Update to Ruby 2.0
table_spec.rb Update to Ruby 2.0
tables_spec.rb Update to Ruby 2.0
tbody_spec.rb Update to Ruby 2.0
tbodys_spec.rb Update to Ruby 2.0
td_spec.rb Update to Ruby 2.0
tds_spec.rb Update to Ruby 2.0
text_field_spec.rb Update to Ruby 2.0
text_fields_spec.rb Update to Ruby 2.0
textarea_spec.rb Update to Ruby 2.0
textareas_spec.rb Update to Ruby 2.0
tfoot_spec.rb Update to Ruby 2.0
tfoots_spec.rb Update to Ruby 2.0
thead_spec.rb Update to Ruby 2.0
theads_spec.rb Update to Ruby 2.0
tr_spec.rb Update to Ruby 2.0
trs_spec.rb Update to Ruby 2.0
ul_spec.rb Update to Ruby 2.0
uls_spec.rb Update to Ruby 2.0
wait_spec.rb Update to Ruby 2.0
watirspec.rake Merge branch 'master' into watir2
window_switching_spec.rb Update to Ruby 2.0

README.markdown

What

This repository is intended to be used as a git submodule for projects that want to implement Watir's API.

The specs run a small Sinatra webapp (WatirSpec::Server) to simulate interacting with a web server. However, most specs use the file:// scheme to avoid hitting the server.

How to use

First add the submodule to spec/watirspec:

$ git submodule add git://github.com/watir/watirspec.git spec/watirspec

The specs will look for implementation.rb in its parent directory (i.e. spec/). In this file you need to define some details about your implementation that WatirSpec needs to know

Here's an example of what spec/implementation.rb would look like for the imaginary implementation AwesomeWatir:

$LOAD_PATH.unshift(«lib folder»)
require "awesomewatir"

include AwesomeWatir::Exception # needed for now..

WatirSpec::Implementation do |imp|
  imp.name = :awesome

  imp.browser_class = AwesomeWatir::Browser
  imp.browser_args  = [some: 'option']
end

WatirSpec.persistent_browser = false               # defaults to true, but can be disabled if needed
WatirSpec::Server.autorun    = false               # defaults to true, but can be disabled if needed

WatirSpec::Server.get("/my_route") { "content" }   # add routes to the server for implementation-specific specs

Implementation-specific specs should be placed at the root of the spec/ folder. To use the setup code from watirspec, simply require "watirspec/spec_helper" (which in turn will load your spec/spec_helper.rb).

Guards

WatirSpec includes a system to guard specs that are failing.

WRITE ME

Where

Something went wrong with that request. Please try again.