Skip to content
Executable specification of the Watir API
Ruby HTML JavaScript
Latest commit 6f8a3ab Mar 27, 2016 @titusfortner titusfortner fix race condition
Failed to load latest commit information.
html Fix "c++" class name which is not a valid class name Jan 10, 2016
lib Remove references to celerity Mar 27, 2016
.gitignore added tests for wait timer Mar 28, 2014
LICENSE Bump year in copyright Jan 2, 2014
README.markdown Update to Ruby 2.0 May 26, 2015
after_hooks_spec.rb remove watir_classic guards Mar 27, 2016
alert_spec.rb remove watir_classic guards Mar 27, 2016
area_spec.rb Update to Ruby 2.0 May 26, 2015
areas_spec.rb Remove references to celerity Mar 27, 2016
browser_spec.rb fix race condition Mar 27, 2016
button_spec.rb remove watir_classic guards Mar 27, 2016
buttons_spec.rb Remove references to celerity Mar 27, 2016
checkbox_spec.rb Update to Ruby 2.0 May 26, 2015
checkboxes_spec.rb Remove references to celerity Mar 27, 2016
collections_spec.rb Update to Ruby 2.0 May 26, 2015
cookies_spec.rb remove watir_classic guards Mar 27, 2016
dd_spec.rb Update to Ruby 2.0 May 26, 2015
dds_spec.rb Remove references to celerity Mar 27, 2016
del_spec.rb Update to Ruby 2.0 May 26, 2015
dels_spec.rb Remove references to celerity Mar 27, 2016
div_spec.rb remove watir_classic guards Mar 27, 2016
divs_spec.rb Remove references to celerity Mar 27, 2016
dl_spec.rb Remove references to unsupported versions of IE Mar 27, 2016
dls_spec.rb Remove references to celerity Mar 27, 2016
drag_and_drop_spec.rb remove watir_classic guards Mar 27, 2016
dt_spec.rb Update to Ruby 2.0 May 26, 2015
dts_spec.rb Remove references to celerity Mar 27, 2016
element_spec.rb remove watir_classic guards Mar 27, 2016
elements_spec.rb Update to Ruby 2.0 May 26, 2015
em_spec.rb Update to Ruby 2.0 May 26, 2015
ems_spec.rb Remove references to celerity Mar 27, 2016
filefield_spec.rb remove watir_classic guards Mar 27, 2016
filefields_spec.rb Remove references to celerity Mar 27, 2016
font_spec.rb Remove references to celerity Mar 27, 2016
form_spec.rb Remove references to unsupported versions of IE Mar 27, 2016
forms_spec.rb Remove references to celerity Mar 27, 2016
frame_spec.rb remove watir_classic guards Mar 27, 2016
frames_spec.rb Remove references to celerity Mar 27, 2016
hidden_spec.rb Update to Ruby 2.0 May 26, 2015
hiddens_spec.rb Remove references to celerity Mar 27, 2016
hn_spec.rb Make hn specs compatible with latest rspec Jan 10, 2016
hns_spec.rb Remove references to celerity Mar 27, 2016
iframe_spec.rb remove watir_classic guards Mar 27, 2016
iframes_spec.rb Remove references to celerity Mar 27, 2016
image_spec.rb remove watir_classic guards Mar 27, 2016
images_spec.rb Remove references to celerity Mar 27, 2016
ins_spec.rb Update to Ruby 2.0 May 26, 2015
inses_spec.rb Remove references to celerity Mar 27, 2016
label_spec.rb Update to Ruby 2.0 May 26, 2015
labels_spec.rb Remove references to celerity Mar 27, 2016
li_spec.rb Update to Ruby 2.0 May 26, 2015
link_spec.rb Update to Ruby 2.0 May 26, 2015
links_spec.rb Remove references to celerity Mar 27, 2016
lis_spec.rb Remove references to celerity Mar 27, 2016
map_spec.rb Update to Ruby 2.0 May 26, 2015
maps_spec.rb Remove references to celerity Mar 27, 2016
meta_spec.rb Update to Ruby 2.0 May 26, 2015
metas_spec.rb Remove references to celerity Mar 27, 2016
ol_spec.rb Update to Ruby 2.0 May 26, 2015
ols_spec.rb Remove references to celerity Mar 27, 2016
option_spec.rb change to identify as textarea Oct 1, 2015
p_spec.rb Update to Ruby 2.0 May 26, 2015
pre_spec.rb Update to Ruby 2.0 May 26, 2015
pres_spec.rb Remove references to celerity Mar 27, 2016
ps_spec.rb Remove references to celerity Mar 27, 2016
radio_spec.rb Update to Ruby 2.0 May 26, 2015
radios_spec.rb Remove references to celerity Mar 27, 2016
screenshot_spec.rb Change from RSpect should syntax to expect syntax. Also from == to eq… Oct 26, 2013
select_list_spec.rb remove watir_classic guards Mar 27, 2016
select_lists_spec.rb Remove references to celerity Mar 27, 2016
span_spec.rb Update to Ruby 2.0 May 26, 2015
spans_spec.rb Remove references to celerity Mar 27, 2016
spec_helper.rb Add SilentLogger to silence WEBrick once and for all. Closes #29. Jan 7, 2013
strong_spec.rb Update to Ruby 2.0 May 26, 2015
strongs_spec.rb Remove references to celerity Mar 27, 2016
table_nesting_spec.rb Update to Ruby 2.0 May 26, 2015
table_spec.rb remove watir_classic guards Mar 27, 2016
tables_spec.rb Remove references to celerity Mar 27, 2016
tbody_spec.rb Update to Ruby 2.0 May 26, 2015
tbodys_spec.rb Remove references to celerity Mar 27, 2016
td_spec.rb Update to Ruby 2.0 May 26, 2015
tds_spec.rb Remove references to celerity Mar 27, 2016
text_field_spec.rb Update to Ruby 2.0 May 26, 2015
text_fields_spec.rb Remove references to celerity Mar 27, 2016
textarea_spec.rb Update to Ruby 2.0 May 26, 2015
textareas_spec.rb Update to Ruby 2.0 May 26, 2015
tfoot_spec.rb Update to Ruby 2.0 May 26, 2015
tfoots_spec.rb Remove references to celerity Mar 27, 2016
thead_spec.rb Update to Ruby 2.0 May 26, 2015
theads_spec.rb Remove references to celerity Mar 27, 2016
tr_spec.rb remove watir_classic guards Mar 27, 2016
trs_spec.rb Remove references to celerity Mar 27, 2016
ul_spec.rb Update to Ruby 2.0 May 26, 2015
uls_spec.rb Remove references to celerity Mar 27, 2016
wait_spec.rb remove watir_classic guards Mar 27, 2016
watirspec.rake Merge branch 'master' into watir2 Oct 11, 2010
window_switching_spec.rb remove watir_classic guards Mar 27, 2016

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.