@@ -76,8 +76,6 @@ protected function methods()
76
76
'forward ' => array ('POST ' ),
77
77
'back ' => array ('POST ' ),
78
78
'refresh ' => array ('POST ' ),
79
- 'execute ' => array ('POST ' ),
80
- 'execute_async ' => array ('POST ' ),
81
79
'screenshot ' => array ('GET ' ),
82
80
'cookie ' => array ('GET ' , 'POST ' ), // for DELETE, use deleteAllCookies()
83
81
'source ' => array ('GET ' ),
@@ -433,13 +431,11 @@ public function log()
433
431
*/
434
432
public function execute (array $ jsonScript )
435
433
{
436
- if (isset ($ jsonScript ['args ' ])) {
437
- $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
438
- }
434
+ $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
439
435
440
436
$ result = $ this ->curl ('POST ' , '/execute ' , $ jsonScript );
441
437
442
- return $ this ->unserializeResult ($ result );
438
+ return $ this ->unserializeResult ($ result[ ' value ' ] );
443
439
}
444
440
445
441
/**
@@ -451,13 +447,11 @@ public function execute(array $jsonScript)
451
447
*/
452
448
public function execute_async (array $ jsonScript )
453
449
{
454
- if (isset ($ jsonScript ['args ' ])) {
455
- $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
456
- }
450
+ $ jsonScript ['args ' ] = $ this ->serializeArguments ($ jsonScript ['args ' ]);
457
451
458
452
$ result = $ this ->curl ('POST ' , '/execute_async ' , $ jsonScript );
459
453
460
- return $ this ->unserializeResult ($ result );
454
+ return $ this ->unserializeResult ($ result[ ' value ' ] );
461
455
}
462
456
463
457
/**
0 commit comments