File tree Expand file tree Collapse file tree
selenium/webdriver/common
test/unit/selenium/webdriver/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Selenium (TBA next version)
22* Fix frame_to_be_available_and_switch_to_it() for string inputs (#10963)
3- * Implicit non w3c capability conversion for `acceptSslCerts`, `platform` and `version` is now deprecated.
3+ * Implicit non w3c capability conversion for `acceptSslCerts`, `platform` and `version` is now deprecated
44* Additional type hints
55* Less strict requirements on the version of `certifi`
6+ * Bugfix options returning `None` when strict_file_interactability, set_window_rect or accept_insecure_certs are not set
67
78
89Selenium 4.4.3
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ def accept_insecure_certs(self) -> bool:
157157 """
158158 :returns: whether the session accepts insecure certificates
159159 """
160- return self ._caps .get ('acceptInsecureCerts' )
160+ return self ._caps .get ('acceptInsecureCerts' , False )
161161
162162 @accept_insecure_certs .setter
163163 def accept_insecure_certs (self , value : bool ) -> None :
@@ -174,7 +174,7 @@ def strict_file_interactability(self) -> bool:
174174 """
175175 :returns: whether session is strict about file interactability
176176 """
177- return self ._caps .get ('strictFileInteractability' )
177+ return self ._caps .get ('strictFileInteractability' , False )
178178
179179 @strict_file_interactability .setter
180180 def strict_file_interactability (self , value : bool ) -> None :
@@ -190,7 +190,7 @@ def set_window_rect(self) -> bool:
190190 """
191191 :returns: whether the remote end supports setting window size and position
192192 """
193- return self ._caps .get ('setWindowRect' )
193+ return self ._caps .get ('setWindowRect' , False )
194194
195195 @set_window_rect .setter
196196 def set_window_rect (self , value : bool ) -> None :
Original file line number Diff line number Diff line change @@ -58,3 +58,10 @@ def test_enable_mobile_with_device_serial(options):
5858 android_activity = "crackers" ,
5959 device_serial = "1234" )
6060 options .mobile_options ["androidDeviceSerial" ] == "1234"
61+
62+
63+ def test_missing_capabilities_return_false_rather_than_none ():
64+ options = ArgOptions ()
65+ assert options .strict_file_interactability is False
66+ assert options .set_window_rect is False
67+ assert options .accept_insecure_certs is False
You can’t perform that action at this time.
0 commit comments