[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-8090":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":21,"defaultBranch":22,"hasWiki":20,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},8090,"capybara-webkit","thoughtbot\u002Fcapybara-webkit","thoughtbot","A Capybara driver for headless WebKit to test JavaScript web apps","https:\u002F\u002Fthoughtbot.com\u002Fopen-source",null,"Ruby",1954,418,3,24,0,1,55.97,"MIT License",true,false,"master",[],"2026-06-12 04:00:37","capybara-webkit\n===============\n\n**Development has been suspended** on this project because QtWebKit was\ndeprecated in favor of QtWebEngine, which is not a suitable replacement for our\npurposes.\n\nWe instead recommend using the [Selenium] or [Apparition] drivers.\n\n[Selenium]: https:\u002F\u002Fgithub.com\u002Fteamcapybara\u002Fcapybara#selenium\n[Apparition]: https:\u002F\u002Fgithub.com\u002Ftwalpole\u002Fapparition\n\nQt Dependency and Installation Issues\n-------------------------------------\n\ncapybara-webkit depends on a WebKit implementation from Qt, a cross-platform\ndevelopment toolkit. You'll need to download the Qt libraries to build and\ninstall the gem. You can find instructions for downloading and installing Qt on\nthe\n[capybara-webkit wiki](https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Fcapybara-webkit\u002Fwiki\u002FInstalling-Qt-and-compiling-capybara-webkit).\ncapybara-webkit requires Qt version 4.8 or greater.\n\nCI\n--\n\nIf you're like us, you'll be using capybara-webkit on CI.\n\nOn Linux platforms, capybara-webkit requires an X server to run, although it doesn't create any visible windows. Xvfb works fine for this. You can setup Xvfb yourself and set a DISPLAY variable, try out the [headless gem](https:\u002F\u002Fgithub.com\u002Fleonid-shevtsov\u002Fheadless), or use the xvfb-run utility as follows:\n\n```\nxvfb-run -a bundle exec rspec\n```\n\nThis automatically sets up a virtual X server on a free server number.\n\nUsage\n-----\n\nAdd the capybara-webkit gem to your Gemfile:\n\n```ruby\ngem \"capybara-webkit\"\n```\n\nSet your Capybara Javascript driver to webkit:\n\n```ruby\nCapybara.javascript_driver = :webkit\n```\n\nIn cucumber, tag scenarios with @javascript to run them using a headless WebKit browser.\n\nIn RSpec, use the `:js => true` flag. See the [capybara documentation](http:\u002F\u002Frubydoc.info\u002Fgems\u002Fcapybara#Using_Capybara_with_RSpec) for more information about using capybara with RSpec.\n\nTake note of the transactional fixtures section of the [capybara README](https:\u002F\u002Fgithub.com\u002Fjnicklas\u002Fcapybara\u002Fblob\u002Fmaster\u002FREADME.md).\n\nIf you're using capybara-webkit with Sinatra, don't forget to set\n\n```ruby\nCapybara.app = MySinatraApp.new\n```\n\nConfiguration\n-------------\n\nYou can configure global options using `Capybara::Webkit.configure`:\n\n``` ruby\nCapybara::Webkit.configure do |config|\n  # Enable debug mode. Prints a log of everything the driver is doing.\n  config.debug = true\n\n  # By default, requests to outside domains (anything besides localhost) will\n  # result in a warning. Several methods allow you to change this behavior.\n\n  # Silently return an empty 200 response for any requests to unknown URLs.\n  config.block_unknown_urls\n\n  # Allow pages to make requests to any URL without issuing a warning.\n  config.allow_unknown_urls\n\n  # Allow a specific domain without issuing a warning.\n  config.allow_url(\"example.com\")\n\n  # Allow a specific URL and path without issuing a warning.\n  config.allow_url(\"example.com\u002Fsome\u002Fpath\")\n\n  # Wildcards are allowed in URL expressions.\n  config.allow_url(\"*.example.com\")\n\n  # Silently return an empty 200 response for any requests to the given URL.\n  config.block_url(\"example.com\")\n\n  # Timeout if requests take longer than 5 seconds\n  config.timeout = 5\n\n  # Don't raise errors when SSL certificates can't be validated\n  config.ignore_ssl_errors\n\n  # Don't load images\n  config.skip_image_loading\n\n  # Use a proxy\n  config.use_proxy(\n    host: \"example.com\",\n    port: 1234,\n    user: \"proxy\",\n    pass: \"secret\"\n  )\n\n  # Raise JavaScript errors as exceptions\n  config.raise_javascript_errors = true\nend\n```\n\nThese options will take effect for all future sessions and only need to be set\nonce. It's recommended that you configure these in your `spec_helper.rb` or\n`test_helper.rb` rather than a `before` or `setup` block.\n\nOffline Application Cache\n-------------------------\n\nThe offline application cache needs a directory to write to for the cached files. Capybara-webkit\nwill look at if the working directory has a tmp directory and when it exists offline application\ncache will be enabled.\n\nNon-Standard Driver Methods\n---------------------------\n\ncapybara-webkit supports a few methods that are not part of the standard capybara API. You can access these by calling `driver` on the capybara session. When using the DSL, that will look like `page.driver.method_name`.\n\n**console_messages**: returns an array of messages printed using console.log\n\n```js\n\u002F\u002F In Javascript:\nconsole.log(\"hello\")\n```\n\n```ruby\n# In Ruby:\npage.driver.console_messages\n=> [{:source=>\"http:\u002F\u002Fexample.com\", :line_number=>1, :message=>\"hello\"}]\n```\n\n**error_messages**: returns an array of Javascript errors that occurred\n\n```ruby\npage.driver.error_messages\n=> [{:source=>\"http:\u002F\u002Fexample.com\", :line_number=>1, :message=>\"SyntaxError: Parse error\"}]\n```\n\n**cookies**: allows read-only access of cookies for the current session\n\n```ruby\npage.driver.cookies[\"alpha\"]\n=> \"abc\"\n```\n\n**header**: set the given HTTP header for subsequent requests\n\n```ruby\npage.driver.header 'Referer', 'https:\u002F\u002Fwww.thoughtbot.com'\n```\n\n\n[CONTRIBUTING]: CONTRIBUTING.md\n\nLicense\n-------\n\ncapybara-webkit is Copyright (c) 2010-2015 thoughtbot, inc. It is free software,\nand may be redistributed under the terms specified in the [LICENSE] file.\n\n[LICENSE]: \u002FLICENSE\n\nAbout\n-----\n\nThank you, [contributors]!\n\n[contributors]: https:\u002F\u002Fgithub.com\u002Fthoughtbot\u002Fcapybara-webkit\u002Fgraphs\u002Fcontributors\n\nCode for rendering the current webpage to a PNG is borrowed from Phantom.js'\nimplementation.\n\n![thoughtbot](http:\u002F\u002Fpresskit.thoughtbot.com\u002Fimages\u002Fthoughtbot-logo-for-readmes.svg)\n\ncapybara-webkit is maintained and funded by thoughtbot, inc.\nThe names and logos for thoughtbot are trademarks of thoughtbot, inc.\n\nWe love open source software!\nSee [our other projects][community]\nor [hire us][hire] to help build your product.\n\n[community]: https:\u002F\u002Fthoughtbot.com\u002Fcommunity?utm_source=github\n[hire]: https:\u002F\u002Fthoughtbot.com\u002Fhire-us?utm_source=github\n","capybara-webkit 是一个基于无头 WebKit 的 Capybara 驱动程序，用于测试 JavaScript 网页应用。它通过 Qt 库提供的 WebKit 实现来运行浏览器环境，支持 Ruby 语言，并且可以与 RSpec 或 Cucumber 等测试框架集成，以实现自动化前端测试。项目依赖于 Qt 版本 4.8 或更高版本，需要用户自行下载和安装相应的库文件。尽管开发已暂停（推荐使用 Selenium 或 Apparition 替代），但在持续集成环境中，特别是 Linux 平台上配合 Xvfb 使用时，capybara-webkit 仍是一个可行的选择，适用于那些需要在无图形界面环境下进行网页应用功能测试的场景。",2,"2026-06-11 03:16:01","top_language"]