File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 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 = {})
3434 @screen_size ||= DEFAULT_MAXIMIZE_SCREEN_SIZE
3535 @options [ :save_path ] ||= File . expand_path ( Capybara . save_path ) if Capybara . save_path
3636
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
3842
3943 ENV [ "FERRUM_DEBUG" ] = "true" if ENV [ "CUPRITE_DEBUG" ]
4044
Original file line number Diff line number Diff line change 55 it "sets the remote-allow-origins option" do
66 driver = described_class . new ( nil )
77
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" : "*" )
99 end
1010 end
1111
You can’t perform that action at this time.
0 commit comments