@@ -41,20 +41,20 @@ def test_we_can_pass_options(self, driver, pages):
4141class TestUnit :
4242 def test_ctor (self ):
4343 opts = Options ()
44- assert opts ._binary is None
45- assert not opts ._preferences
44+ assert opts .binary_location == ""
45+ assert opts ._preferences == { "remote.active-protocols" : 3 }
4646 assert opts ._profile is None
4747 assert not opts ._arguments
4848 assert isinstance (opts .log , Log )
4949
5050 def test_binary (self ):
5151 opts = Options ()
52- assert opts .binary is None
52+ assert opts .binary_location == ""
5353
5454 other_binary = FirefoxBinary ()
55- assert other_binary != opts .binary
55+ assert other_binary != opts .binary_location
5656 opts .binary = other_binary
57- assert other_binary == opts .binary
57+ assert other_binary . _start_cmd == opts .binary_location
5858
5959 path = "/path/to/binary"
6060 opts .binary = path
@@ -63,16 +63,16 @@ def test_binary(self):
6363
6464 def test_prefs (self ):
6565 opts = Options ()
66- assert len (opts .preferences ) == 0
66+ assert len (opts .preferences ) == 1
6767 assert isinstance (opts .preferences , dict )
6868
6969 opts .set_preference ("spam" , "ham" )
70- assert len (opts .preferences ) == 1
71- opts .set_preference ("eggs" , True )
7270 assert len (opts .preferences ) == 2
71+ opts .set_preference ("eggs" , True )
72+ assert len (opts .preferences ) == 3
7373 opts .set_preference ("spam" , "spam" )
74- assert len (opts .preferences ) == 2
75- assert opts .preferences == {"spam " : "spam" , "eggs " : True }
74+ assert len (opts .preferences ) == 3
75+ assert opts .preferences == {"eggs " : True , "remote.active-protocols" : 3 , "spam " : "spam" }
7676
7777 def test_profile (self , tmpdir_factory ):
7878 opts = Options ()
@@ -99,7 +99,12 @@ def test_arguments(self):
9999 def test_to_capabilities (self ):
100100 opts = Options ()
101101 firefox_caps = DesiredCapabilities .FIREFOX .copy ()
102- firefox_caps .update ({"pageLoadStrategy" : PageLoadStrategy .normal })
102+ firefox_caps .update (
103+ {
104+ "pageLoadStrategy" : PageLoadStrategy .normal ,
105+ "moz:firefoxOptions" : {"prefs" : {"remote.active-protocols" : 3 }},
106+ }
107+ )
103108 assert opts .to_capabilities () == firefox_caps
104109
105110 profile = FirefoxProfile ()
0 commit comments