{"id":20447570,"url":"https://github.com/doamaral/ruby-rspec-selenium-capybara","last_synced_at":"2026-04-15T22:34:59.934Z","repository":{"id":40196332,"uuid":"223254417","full_name":"doamaral/ruby-rspec-selenium-capybara","owner":"doamaral","description":"Trying out basic setup and features for UI testing using Capybara","archived":false,"fork":false,"pushed_at":"2022-10-20T03:38:48.000Z","size":14,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-05T08:51:25.188Z","etag":null,"topics":["capybara","rspec","ruby","selenium"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doamaral.png","metadata":{"files":{"readme":"README.md","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":"2019-11-21T19:59:01.000Z","updated_at":"2022-12-22T04:39:40.000Z","dependencies_parsed_at":"2022-09-11T13:11:25.543Z","dependency_job_id":null,"html_url":"https://github.com/doamaral/ruby-rspec-selenium-capybara","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/doamaral/ruby-rspec-selenium-capybara","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doamaral%2Fruby-rspec-selenium-capybara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doamaral%2Fruby-rspec-selenium-capybara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doamaral%2Fruby-rspec-selenium-capybara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doamaral%2Fruby-rspec-selenium-capybara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doamaral","download_url":"https://codeload.github.com/doamaral/ruby-rspec-selenium-capybara/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doamaral%2Fruby-rspec-selenium-capybara/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31863494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: 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":["capybara","rspec","ruby","selenium"],"created_at":"2024-11-15T10:27:54.585Z","updated_at":"2026-04-15T22:34:59.918Z","avatar_url":"https://github.com/doamaral.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ruby-rspec-selenium-capybara\n\nIncrementing test project with Capybara. Although Capybara is not required to automate ui tests, it has a great DSL that might boost our experience scripting automate tests.\n\n## Initial project structure\n\n- Same basic steps from the [`ruby-rspec-selenium` Project](https://github.com/doamaral/ruby-rspec-selenium) until the `Writing first test script` Step\n- Add `gem 'capybara', '~\u003e 3.29'` to the Gemfile\n- Run `bundle install` command to install all your gems\n- Add `require 'capybara/rspec'` and `config.include Capybara::DSL` to the `spec_helper.rb` file\n- Add basic Browser configurations through `Capybara.configure do |config|`\n\n```ruby\nCapybara.configure do |config|\n    config.default_driver = :selenium #Firefox default driver, it's also possible to use  :selenium_chrome and :selenium_chrome_headless\n    config.default_max_wait_time = 5 #implicit wait\n    config.app_host = \"http://the-internet.herokuapp.com\"\nend\n```\n\nObs: [More possible configs](https://www.rubydoc.info/github/jnicklas/capybara/Capybara.configure)\n\n## Using Capybara's DSL\n\n[capybara cheat sheet](https://gist.github.com/zhengjia/428105)\n\n- Navigation is done using `visit \"\u003cURL\u003e\"`\n- [Actions](https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Actions):\n  - `fill_in [locator], with: \"value\"`: locator can be the  name, id, test_id attribute, placeholder, or label text\n  - `click_on [locator]` or `click_button [locator]`\n  - `choose [locator]`\n  - `check [locator]`\n  - `select \"Option\", from: [locator]`\n- [Finders](https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Finders):\n  - `find`\n  - `find_link`\n  - `find_button`\n- [Querying](https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Node/Matchers):\n  - `page.has_selector?('table tr')`\n  - `page.has_selector?(:xpath, './/table/tr')`\n  - `page.has_xpath?('.//table/tr')`\n  - `page.has_css?('table tr.foo')`\n  - `page.has_content?('foo')`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoamaral%2Fruby-rspec-selenium-capybara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoamaral%2Fruby-rspec-selenium-capybara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoamaral%2Fruby-rspec-selenium-capybara/lists"}