{"id":13806890,"url":"https://github.com/yuki24/capybara-shadowdom","last_synced_at":"2025-04-12T23:21:55.112Z","repository":{"id":59151921,"uuid":"420843567","full_name":"yuki24/capybara-shadowdom","owner":"yuki24","description":"Shadow DOM support for Capybara","archived":false,"fork":false,"pushed_at":"2023-07-05T13:13:00.000Z","size":29,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T19:47:30.997Z","etag":null,"topics":["capybara","custom-elements","minitest","rails","rspec","ruby","ruby-on-rails","shadow-dom","testing","web-components"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuki24.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-25T01:42:37.000Z","updated_at":"2025-03-25T07:06:22.000Z","dependencies_parsed_at":"2024-05-03T11:14:18.869Z","dependency_job_id":"d2ba3c12-16b2-4b6b-a86c-7c5ff424fb67","html_url":"https://github.com/yuki24/capybara-shadowdom","commit_stats":{"total_commits":36,"total_committers":1,"mean_commits":36.0,"dds":0.0,"last_synced_commit":"4589e93ad1da4c806d986e85fa110a019fd4afb5"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuki24%2Fcapybara-shadowdom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuki24%2Fcapybara-shadowdom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuki24%2Fcapybara-shadowdom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuki24%2Fcapybara-shadowdom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuki24","download_url":"https://codeload.github.com/yuki24/capybara-shadowdom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248644183,"owners_count":21138565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","custom-elements","minitest","rails","rspec","ruby","ruby-on-rails","shadow-dom","testing","web-components"],"created_at":"2024-08-04T01:01:17.584Z","updated_at":"2025-04-12T23:21:55.090Z","avatar_url":"https://github.com/yuki24.png","language":"Ruby","funding_links":[],"categories":["Meta Frameworks","Ruby"],"sub_categories":["Testing Solutions"],"readme":"# Shadow DOM support for Capybara\n\nThe `capybara-shadowdom` gem adds basic support for the [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to Capybara.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'capybara-shadowdom'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install capybara-shadowdom\n\n## Usage\n\nRequire it in `spec_helper.rb`:\n\n```rb\nrequire 'capybara/shadowdom'\n```\n\nGiven the custom element:\n\n```html\n\u003cawesome-element\u003e\n  \u003c!-- #shadow-root start --\u003e\n  \u003cspan\u003eHello shadow world!\u003c/span\u003e\n\n  \u003cinput type=\"text\" id=\"user_name\"\u003e\n  \u003c!-- #shadow-root end --\u003e\n\u003c/awesome-element\u003e\n```\n\nYou will be able to do:\n\n```ruby\nwithin custom_element.shadow_root do\n  # Displays \"Hello shadow world!\":\n  puts page.text\n\n  # Asserts the text within the element:\n  assert_text \"Hello shadow world!\"\n\n  # Input elements within the shadow DOM will also be accessible:\n  fill_in \"#user_name\", with: \"awesome@example.org\"\nend\n```\n\nWorks also for `RSpec`:\n\n```ruby\nexpect(page).to have_text(\"Hello shadow world!\")\n```\n\n## Browser Support\n\n* **Supported Selenium versions**: 3.0 and above\n* **Supported Ruby versions**: 2.7 and above\n\n### Supported drivers:\n\n| Driver                                                 | Browser           | Support | Description                 |\n| :---                                                   | :----             | :---:   | :---                        |\n| Selenium                                               | IE11              | N/A     | Shadow DOM is not supported. |\n| Selenium                                               | Edge              | ✅      | |\n| Selenium                                               | Firefox           | ❌      | Fails with `Cyclic object value`. |\n| Selenium                                               | Chrome            | ✅      |                             |\n| Selenium                                               | Safari            | ✅      |                             |\n| [`cuprite` ](https://github.com/rubycdp/cuprite)       | Embedded Chromium | ✅      |                             |\n| [`apparition`](https://github.com/twalpole/apparition) | Embedded Chromium | ❌      | `shadowRoot` node can not be retrieved. |\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can\nalso run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the\nversion number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version,\npush git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yuki24/capybara-shadowdom. This project\nis intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the\n[code of conduct](https://github.com/yuki24/capybara-shadowdom/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Capybara::Shadowdom project's codebases, issue trackers, chat rooms and mailing lists\nis expected to follow the\n[code of conduct](https://github.com/yuki24/capybara-shadowdom/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuki24%2Fcapybara-shadowdom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuki24%2Fcapybara-shadowdom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuki24%2Fcapybara-shadowdom/lists"}