diff --git a/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tools/wptrunner/wptrunner/executors/executorwebdriver.py index ed145823e2b900..26b73b7deb7af2 100644 --- a/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -77,7 +77,11 @@ def execute_script(self, script, asynchronous=False, args=None): def set_timeout(self, timeout): self.webdriver.timeouts.script = timeout - def create_window(self, type="tab", **kwargs): + def create_window(self, type=None, **kwargs): + # WebKitGTK-based browsers have issues when the test is opened in a new tab instead of a separate window + # See: https://github.com/web-platform-tests/wpt/issues/49262 and https://webkit.org/b/283392 + if type is None: + type = 'window' if 'webkitgtk:browserOptions' in self.parent.capabilities else 'tab' return self.webdriver.new_window(type_hint=type) @property