mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
修复_chrome_options_to_dict()有debugger_address时不返回其它值的bug
This commit is contained in:
parent
4a8cdc0a73
commit
e89a787efd
@ -49,7 +49,7 @@ class OptionsManager(object):
|
||||
option[j[0]] = self._conf.get(section, j[0])
|
||||
return option
|
||||
|
||||
def set_item(self, section: str, item: str, value: str) -> None:
|
||||
def set_item(self, section: str, item: str, value: Any) -> None:
|
||||
"""设置配置值"""
|
||||
self._conf.set(section, item, str(value))
|
||||
|
||||
@ -145,13 +145,11 @@ def _chrome_options_to_dict(options: Union[dict, Options, None]) -> Union[dict,
|
||||
return options
|
||||
|
||||
re_dict = dict()
|
||||
if options.debugger_address:
|
||||
re_dict['debugger_address'] = options.debugger_address
|
||||
else:
|
||||
re_dict['binary_location'] = options.binary_location
|
||||
re_dict['debugger_address'] = options.debugger_address
|
||||
re_dict['arguments'] = options.arguments
|
||||
re_dict['extensions'] = options.extensions
|
||||
re_dict['experimental_options'] = options.experimental_options
|
||||
# re_dict['capabilities'] = options.capabilities
|
||||
re_dict['debugger_address'] = options.debugger_address
|
||||
re_dict['binary_location'] = options.binary_location
|
||||
re_dict['debugger_address'] = options.debugger_address
|
||||
re_dict['arguments'] = options.arguments
|
||||
re_dict['extensions'] = options.extensions
|
||||
re_dict['experimental_options'] = options.experimental_options
|
||||
# re_dict['capabilities'] = options.capabilities
|
||||
return re_dict
|
||||
|
Loading…
x
Reference in New Issue
Block a user