File tree 1 file changed +18
-0
lines changed
tools/wptrunner/wptrunner/browsers
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
# mypy: allow-untyped-defs
2
2
3
+ import traceback
3
4
from .base import WebDriverBrowser , require_arg
4
5
from .base import get_timeout_multiplier # noqa: F401
6
+ from ..environment import wait_for_service
5
7
from ..executors import executor_kwargs as base_executor_kwargs
6
8
from ..executors .base import WdspecExecutor # noqa: F401
7
9
from ..executors .executorchrome import ChromeDriverPrintRefTestExecutor # noqa: F401
@@ -60,3 +62,19 @@ class ChromeiOSBrowser(WebDriverBrowser):
60
62
def make_command (self ):
61
63
return ([self .webdriver_binary , f"--port={ self .port } " ] +
62
64
self .webdriver_args )
65
+
66
+ def start (self , group_metadata , ** kwargs ):
67
+ super ().start (group_metadata , ** kwargs )
68
+ try :
69
+ wait_for_service (
70
+ self .logger ,
71
+ self .host ,
72
+ self .port ,
73
+ timeout = self .init_timeout ,
74
+ server_process = self ._proc ,
75
+ )
76
+ except Exception :
77
+ self .logger .error (
78
+ "WebDriver was not accessible "
79
+ f"within the timeout:\n { traceback .format_exc ()} " )
80
+ raise
You can’t perform that action at this time.
0 commit comments