Skip to content

Conversation

@mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Apr 15, 2022

Fix release, 8bb204d refactoring has broken the Session::{execute, execute_async} methods.

parent::execute($jsonScript) is equivalent to:
$this->curl('POST', '/execute', $jsonScript)['value']
not
$this->curl('POST', '/execute', $jsonScript)

tested /w #110 (comment) example, ideally such example should be added to tests

'forward' => array('POST'),
'back' => array('POST'),
'refresh' => array('POST'),
'execute' => array('POST'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pure cleanup as explicitly defined methods seems to be not defined in this list

if (isset($jsonScript['args'])) {
$jsonScript['args'] = $this->serializeArguments($jsonScript['args']);
}
$jsonScript['args'] = $this->serializeArguments($jsonScript['args']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pure cleanup, args are always required, otherwise Selenium throws:

  WebDriver\Exception\UnknownError: invalid argument: 'args' must be a list
        (Session info: headless chrome=84.0.4147.105)
      Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
      System info: host: 'xxx', ip: 'xxx', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '12.0.2'
      Driver info: driver.version: unknown in C:\...\vendor\instaclick\php-webdriver\lib\WebDriver\Exception.php:156
      Stack trace:
      #0 C:\...\vendor\instaclick\php-webdriver\lib\WebDriver\AbstractWebDriver.php(170): WebDriver\Exception::factory()
      #1 C:\...\vendor\instaclick\php-webdriver\lib\WebDriver\AbstractWebDriver.php(243): WebDriver\AbstractWebDriver->curl()
      #2 C:\...\vendor\instaclick\php-webdriver\lib\WebDriver\Container.php(241): WebDriver\AbstractWebDriver->__call()
      #3 C:\...\vendor\instaclick\php-webdriver\lib\WebDriver\Session.php(440): WebDriver\Container->__call()
      #4 src\Behat\Context.php(297): WebDriver\Session->execute()

@robocoder robocoder merged commit 623eb02 into instaclick:1.x Apr 15, 2022
@robocoder
Copy link
Member

Thanks again.

@mvorisek mvorisek deleted the fix_release branch April 15, 2022 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants