From 5accc6304085c0e415658897a07d3a4c22d9d39e Mon Sep 17 00:00:00 2001 From: Pierre Hedkvist Date: Thu, 16 Nov 2017 14:29:15 +0000 Subject: [ci skip] Added example for using headless_chrome with ActionDispatch::SystemTestCase --- guides/source/testing.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'guides/source') diff --git a/guides/source/testing.md b/guides/source/testing.md index c5b2a694e7..8416fd163d 100644 --- a/guides/source/testing.md +++ b/guides/source/testing.md @@ -671,6 +671,16 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase end ``` +If you want to use a headless browser, you could use Headless Chrome by adding `headless_chrome` in the `:using` argument. + +```ruby +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :headless_chrome +end +``` + If your Capybara configuration requires more setup than provided by Rails, this additional configuration could be added into the `application_system_test_case.rb` file. -- cgit v1.2.3