Pre Merge pull request !50 from 有三/dev

This commit is contained in:
有三 2024-07-22 17:44:30 +00:00 committed by Gitee
commit 51d0193655
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -457,9 +457,10 @@ class Chromium(object):
:param owner: 使用该驱动的对象 :param owner: 使用该驱动的对象
:return: Driver对象 :return: Driver对象
""" """
d = self._drivers.pop(tab_id, None) d = self._drivers.get(tab_id, None)
if not d: if not d:
d = Driver(tab_id, 'page', self.address) d = Driver(tab_id, 'page', self.address)
self._drivers[tab_id] = d
d.owner = owner d.owner = owner
self._all_drivers.setdefault(tab_id, set()).add(d) self._all_drivers.setdefault(tab_id, set()).add(d)
return d return d