File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ def initialize(app, options = {})
34
34
@screen_size ||= DEFAULT_MAXIMIZE_SCREEN_SIZE
35
35
@options [ :save_path ] ||= File . expand_path ( Capybara . save_path ) if Capybara . save_path
36
36
37
- @options [ :"remote-allow-origins" ] = "*"
37
+ # It's set for debug() to make devtools tab open correctly.
38
+ @options [ :browser_options ] ||= { }
39
+ unless @options [ :browser_options ] [ :"remote-allow-origins" ]
40
+ @options [ :browser_options ] . merge! ( "remote-allow-origins" : "*" )
41
+ end
38
42
39
43
ENV [ "FERRUM_DEBUG" ] = "true" if ENV [ "CUPRITE_DEBUG" ]
40
44
Original file line number Diff line number Diff line change 5
5
it "sets the remote-allow-origins option" do
6
6
driver = described_class . new ( nil )
7
7
8
- expect ( driver . browser . options . to_h ) . to include ( "remote-allow-origins" : "*" )
8
+ expect ( driver . browser . options . to_h [ :browser_options ] ) . to include ( "remote-allow-origins" : "*" )
9
9
end
10
10
end
11
11
You can’t perform that action at this time.
0 commit comments