diff --git a/tools/wptrunner/wptrunner/executors/base.py b/tools/wptrunner/wptrunner/executors/base.py index 0eef3e3cfe86721..a55eb337264c38f 100644 --- a/tools/wptrunner/wptrunner/executors/base.py +++ b/tools/wptrunner/wptrunner/executors/base.py @@ -763,7 +763,7 @@ def process_action(self, url, payload): # AttributeError got an obj property in Python 3.10, for older versions we # fall back to looking at the error message. if ((hasattr(e, "obj") and getattr(e, "obj") == self.protocol) or - f"'{self.protocol.__class__.__name__}' object has no attribute" in str(e)): + f"'{self.protocol.__class__.__name__}' object has no attribute" in str(e)): raise NotImplementedError from e raise except self.unimplemented_exc: diff --git a/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 758c85a01dd0ce7..066eb6f045130b6 100644 --- a/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -126,7 +126,7 @@ async def unsubscribe(self, events): self.logger.info("Unsubscribing from events %s" % events) return await self.webdriver.bidi_session.session.unsubscribe(events=events, contexts=None) - def add_event_listener(self, fn, event): + def add_event_listener(self, fn, event=None): print("adding event listener %s" % event) return self.webdriver.bidi_session.add_event_listener(name=event, fn=fn)