Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ChromeiOS version support #45326

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion tools/wpt/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,22 @@ def install_webdriver(self, dest=None, channel=None, browser_binary=None):
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
if not version_string:
self.logger.warning(
f"Failed to extract version from: {version_string}")
sj0602 marked this conversation as resolved.
Show resolved Hide resolved
return None
return version_string


class Opera(Browser):
Expand Down