diff --git a/resources/testdriver.js b/resources/testdriver.js index 62d1cb1b08dc19..9af36ecac72afd 100644 --- a/resources/testdriver.js +++ b/resources/testdriver.js @@ -1080,9 +1080,8 @@ * @returns {Promise} Fullfilled with object representing accessibilty node * rejected in the cases of failures */ - get_accessibility_api_node: async function(id) { - let node = await window.test_driver_internal.get_accessibility_api_node(id); - return node; + get_accessibility_api_node: function(dom_id) { + return window.test_driver_internal.get_accessibility_api_node(dom_id); } }; @@ -1273,8 +1272,8 @@ throw new Error("clear_device_posture() is not implemented by testdriver-vendor.js"); }, - async get_accessibility_api_node(id) { - throw new Error("not implemented, whoops!"); + async get_accessibility_api_node(dom_id) { + throw new Error("not implemented, whoops!"); } }; })(); diff --git a/tools/wptrunner/wptrunner/executors/actions.py b/tools/wptrunner/wptrunner/executors/actions.py index c2c1c38acbfdb4..a2291fd0a16297 100644 --- a/tools/wptrunner/wptrunner/executors/actions.py +++ b/tools/wptrunner/wptrunner/executors/actions.py @@ -474,9 +474,8 @@ def __init__(self, logger, protocol): self.protocol = protocol def __call__(self, payload): - id = payload["id"] - self.logger.debug(f"Getting accessibility API node for: {id} ------------") - return self.protocol.platform_accessibility.get_accessibility_api_node(id) + dom_id = payload["dom_id"] + return self.protocol.platform_accessibility.get_accessibility_api_node(dom_id) actions = [ClickAction, diff --git a/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tools/wptrunner/wptrunner/executors/executorwebdriver.py index d03d2a8429464e..706e5eeb2bc1e0 100644 --- a/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -223,7 +223,7 @@ class WebDriverPlatformAccessibilityProtocolPart(PlatformAccessibilityProtocolPa def setup(self): self.webdriver = self.parent.webdriver - def get_computed_label(self, id): + def get_accessibility_api_node(self, id): # Is this where the magic should happen? return "Test" diff --git a/tools/wptrunner/wptrunner/executors/protocol.py b/tools/wptrunner/wptrunner/executors/protocol.py index bc522ecd4c6751..3d8aa2fc37b417 100644 --- a/tools/wptrunner/wptrunner/executors/protocol.py +++ b/tools/wptrunner/wptrunner/executors/protocol.py @@ -328,7 +328,7 @@ class PlatformAccessibilityProtocolPart(ProtocolPart): name = "platform_accessibility" @abstractmethod - def get_accessibility_api_node(self, id): + def get_accessibility_api_node(self, dom_id): """Return the the platform accessibilty object. :param id: DOM ID.""" diff --git a/tools/wptrunner/wptrunner/testdriver-extra.js b/tools/wptrunner/wptrunner/testdriver-extra.js index 527e917a5b07b5..e80c3ecb3e31e8 100644 --- a/tools/wptrunner/wptrunner/testdriver-extra.js +++ b/tools/wptrunner/wptrunner/testdriver-extra.js @@ -336,8 +336,7 @@ return create_action("clear_device_posture", {context}); }; - window.test_driver_internal.get_accessibility_api_node = function(id) { - console.log("the id is: ", id); - return create_action("get_accessibility_api_node", {id}); + window.test_driver_internal.get_accessibility_api_node = function(dom_id) { + return create_action("get_accessibility_api_node", {dom_id}); }; })();