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()
324324 return new Frame ($ this ->url . '/frame ' );
325325 }
326326
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+
327340 /**
328341 * timeouts methods: /session/:sessionId/timeouts (POST)
329342 * - $session->timeouts($json) - set timeout for an operation
@@ -343,7 +356,7 @@ public function timeouts()
343356 }
344357
345358 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')
347360 $ timeout = func_get_arg (1 ); // timeout in milliseconds
348361
349362 $ 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
4040 protected function methods ()
4141 {
4242 return array (
43+ // Legacy JSON Wire Protocol
4344 'async_script ' => array ('POST ' ),
4445 'implicit_wait ' => array ('POST ' ),
4546 );
You can’t perform that action at this time.
0 commit comments