We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 461ee94 commit 7797681Copy full SHA for 7797681
guides/source/testing.md
@@ -891,10 +891,12 @@ you have to add remote `url` and set `browser` as remote through `options`.
891
require "test_helper"
892
893
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
894
- options = {
895
- browser: ENV["SELENIUM_REMOTE_URL"].blank? ? :chrome : :remote,
896
- url: ENV["SELENIUM_REMOTE_URL"].blank? ? nil : ENV["SELENIUM_REMOTE_URL"]
897
- }
+ url = ENV.fetch("SELENIUM_REMOTE_URL", nil)
+ options = if url
+ { browser: :remote, url }
+ else
898
+ { browser: :chrome }
899
+ end
900
driven_by :selenium, using: :headless_chrome, options: options
901
end
902
```
0 commit comments