mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1888036 [wpt PR 45326] - Add ChromeiOS version support, a=testonly
Automatic update from web-platform-tests Add ChromeiOS version support (#45326) * Add ChromeiOS version support * fix * fix * fix -- wpt-commits: b847b1030f779d681c955f397a6e36bf6808cd41 wpt-pr: 45326
This commit is contained in:
parent
3992a037ce
commit
ce11f5f25f
@ -1559,7 +1559,23 @@ class ChromeiOS(Browser):
|
||||
raise NotImplementedError
|
||||
|
||||
def version(self, binary=None, webdriver_binary=None):
|
||||
return None
|
||||
if webdriver_binary is None:
|
||||
self.logger.warning(
|
||||
"Cannot find ChromeiOS version without CWTChromeDriver")
|
||||
return None
|
||||
# Use `chrome iOS driver --version` to get the version. Example output:
|
||||
# "125.0.6378.0"
|
||||
try:
|
||||
version_string = call(webdriver_binary, "--version").strip()
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.logger.warning(f"Failed to call {webdriver_binary}: {e}")
|
||||
return None
|
||||
m = re.match(r"[\d][\d\.]*", version_string)
|
||||
if not m:
|
||||
self.logger.warning(
|
||||
f"Failed to extract version from: {version_string}")
|
||||
return None
|
||||
return m.group(0)
|
||||
|
||||
|
||||
class Opera(Browser):
|
||||
|
Loading…
Reference in New Issue
Block a user