{"id":20947888,"url":"https://github.com/chip/watir-on-rails","last_synced_at":"2026-04-21T18:31:44.299Z","repository":{"id":595118,"uuid":"230138","full_name":"chip/watir-on-rails","owner":"chip","description":"This plugin was upgraded to be Rails 2.3.2 compatible","archived":false,"fork":false,"pushed_at":"2009-06-18T02:14:47.000Z","size":82,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T07:48:01.902Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"GoIncremental/negroni-oauth2","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chip.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-06-18T01:57:50.000Z","updated_at":"2019-08-13T14:26:32.000Z","dependencies_parsed_at":"2022-07-07T18:02:20.183Z","dependency_job_id":null,"html_url":"https://github.com/chip/watir-on-rails","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chip/watir-on-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Fwatir-on-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Fwatir-on-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Fwatir-on-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Fwatir-on-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chip","download_url":"https://codeload.github.com/chip/watir-on-rails/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Fwatir-on-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32104438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T00:13:36.420Z","updated_at":"2026-04-21T18:31:44.280Z","avatar_url":"https://github.com/chip.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nUse this plugin to run Watir tests in Rails.\n\nWatir (Web Application Testing in Ruby) supports Internet Explorer, with Safari\nand Firefox ports in development.  Watir boasts a dead simple setup and an\nintuitive API for driving browsers programatically.  Visit\nhttp://wtr.rubyforge.org/ for more information.\n\n\nDependencies\n============\n\nIf you're running Windows, you'll need to\n  gem install watir\n\nIf you're fortunate enough to be on OS X, you can\n  gem install safariwatir\n\n\nInstallation\n============\n\nYou have probably already done this, but just in case...\n  script/plugin install svn://rubyforge.org/var/svn/watir-on-rails\n\nFor version compatible with Rails 2.3.2 (provided by Chip Castle \u003cchip@chipcastle.com\u003e):\n  script/plugin install git://github.com/chip/watir-on-rails.git \n\nGenerating Tests\n================\n\nYou can use the generator to create skeleton Watir tests in test/watir\n  script/generate watir Login\n\n\nRunning Tests\n=============\n\nWatir tests can be executed by running\n  rake test:watir\nYou'll need to have a test server running.\n\n\nDecorating Watir with a DSL\n===========================\n\nSimilar to Rails Integration Tests, WatirOnRails provides developers with the\nmeans to add singleton methods to the browser instance, allowing for the\ndevelopment of a site-specific language.  The WatirOnRails open_browser method\nis mixed into the TestCases generated by Watir.  This method will return an\ninstance of a Watir browser.  Similar to Rails IntegrationTest's open_session,\nit takes an optional block, yielding the browser instance.  A simple\nWatirOnRails test method might look like this...\n\n  def test_login\n    browser = open_browser\n    browser.goto(\"/login\")\n    browser.text_field(:name, \"user[name]\").set(\"dave\")\n    browser.password(:name, \"user[password]\").set(\"test\")\n    browser.button(:index, 1).click\n    assert_select \"div#banner\", /Welcome Dave/\n  end\n\n...while a slightly more advanced WatirOnRails test method using a site-\nspecific language might look like this...\n\n  def test_login\t\n    browser = open_browser\n    browser.login_with :username =\u003e \"dave\", :password =\u003e \"test\"\n    assert_select \"div#banner\", /Welcome Dave/\n  end\n\n  def open_browser\n    super do |browser|\n      def browser.login_with(args)\n        goto(\"/login\")\n        text_field(:name, \"user[name]\").set(args[:username])\n        password(:name, \"user[password]\").set(args[:password])\n        button(:name, \"login\").click\n      end      \n    end\n  end\n\n\nSEND FEEDBACK!\n==============\n\nDave Hoover\ndave.hoover@gmail.com\nhttp://redsquirrel.com/dave/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchip%2Fwatir-on-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchip%2Fwatir-on-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchip%2Fwatir-on-rails/lists"}