File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -324,6 +324,19 @@ public function frame()
324
324
return new Frame ($ this ->url . '/frame ' );
325
325
}
326
326
327
+ /**
328
+ * Get timeouts (W3C): /session/:sessionId/timeouts (GET)
329
+ * - $session->getTimeouts()
330
+ *
331
+ * @return mixed
332
+ */
333
+ public function getTimeouts ()
334
+ {
335
+ $ result = $ this ->curl ('GET ' , '/timeouts ' );
336
+
337
+ return $ result ['value ' ];
338
+ }
339
+
327
340
/**
328
341
* timeouts methods: /session/:sessionId/timeouts (POST)
329
342
* - $session->timeouts($json) - set timeout for an operation
@@ -343,7 +356,7 @@ public function timeouts()
343
356
}
344
357
345
358
if (func_num_args () === 2 ) {
346
- $ type = func_get_arg (0 ); // 'script', 'implicit', or 'page load ' (legacy: 'pageLoad')
359
+ $ type = func_get_arg (0 ); // 'script', 'implicit', or 'pageLoad ' (legacy: 'pageLoad')
347
360
$ timeout = func_get_arg (1 ); // timeout in milliseconds
348
361
349
362
$ arg = $ this ->legacy ? array ('type ' => $ type , 'ms ' => $ timeout ) : array ($ type => $ timeout );
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ final class Timeouts extends AbstractWebDriver
40
40
protected function methods ()
41
41
{
42
42
return array (
43
+ // Legacy JSON Wire Protocol
43
44
'async_script ' => array ('POST ' ),
44
45
'implicit_wait ' => array ('POST ' ),
45
46
);
You can’t perform that action at this time.
0 commit comments