@@ -76,8 +76,6 @@ protected function methods()
7676 'forward ' => array ('POST ' ),
7777 'back ' => array ('POST ' ),
7878 'refresh ' => array ('POST ' ),
79- 'execute ' => array ('POST ' ),
80- 'execute_async ' => array ('POST ' ),
8179 'screenshot ' => array ('GET ' ),
8280 'cookie ' => array ('GET ' , 'POST ' ), // for DELETE, use deleteAllCookies()
8381 'source ' => array ('GET ' ),
@@ -433,13 +431,11 @@ public function log()
433431 */
434432 public function execute (array $ jsonScript )
435433 {
436- if (isset ($ jsonScript ['args ' ])) {
437- $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
438- }
434+ $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
439435
440436 $ result = $ this ->curl ('POST ' , '/execute ' , $ jsonScript );
441437
442- return $ this ->unserializeResult ($ result );
438+ return $ this ->unserializeResult ($ result[ ' value ' ] );
443439 }
444440
445441 /**
@@ -451,13 +447,11 @@ public function execute(array $jsonScript)
451447 */
452448 public function execute_async (array $ jsonScript )
453449 {
454- if (isset ($ jsonScript ['args ' ])) {
455- $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
456- }
450+ $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
457451
458452 $ result = $ this ->curl ('POST ' , '/execute_async ' , $ jsonScript );
459453
460- return $ this ->unserializeResult ($ result );
454+ return $ this ->unserializeResult ($ result[ ' value ' ] );
461455 }
462456
463457 /**
0 commit comments