def _check_version(self):
if self.version_check:
output = await run_subprocess([self.binary, '--version'])
match = self._version_re.search(output)
if not match:
raise ValueError(
'Could not determine version of geckodriver. To '
'disable version checking, set `version_check` to '
'`False`.'
)
version_str = match.group(1)
version = StrictVersion(version_str)
if version < StrictVersion('0.16.1'):
raise ValueError(
f'Geckodriver version {version_str} is too old. 0.16.1 or '
f'higher is required. To disable version checking, set '
f'`version_check` to `False`.'
)
评论列表
文章目录