Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Mink + Zombie Driver: Error while processing click and clickLink #145

Description

@LogansUA

Hello everyone.
I'm trying to do some thing using custom symfony console command.
In console command i starting zombie session like in example:

/**
 * Start session
 */
public function startSession()
{
    $host = '127.0.0.1';
    $port = '8124';
    $node = '/home/oleg/.nvm/versions/io.js/v3.3.1/bin/iojs';

    $this->mink = new Mink([
        'zombie' => new Session(new ZombieDriver(new ZombieServer($host, $port, $node))),
    ]);

    $this->mink->setDefaultSessionName('zombie');
    $this->mink->getSession();
}

After that, i'm getting session and trying to execute some scenarios:

// Get session
$session = $this->scenarioService->getMink()->getSession('zombie');

// Scenario
$session->visit($site->getUrl());
$session->getPage()->clickLink('Some text');

HTML link view:

<li id="item-id">
     <a href="/some/specific/url?with=params">Some text</a>
</li>

And there come's error's:
Sometimes getting this:

[Behat\Mink\Exception\DriverException]                                                                                                                                        
  Error while processing event 'click': "Error: Timeout: did not get to load all resources on this page
    at timeout (/usr/local/lib/node_modules/zombie/lib/eventloop.js:601:38)
    at Timer.listOnTimeout (timers.js:89:15)" 

And sometimes getting that:

[Behat\Mink\Exception\DriverException]                                                                                                                                        
  Error while processing event 'click': "TypeError: Cannot set property 'aborted' of null
    at XMLHttpRequest.abort (/usr/local/lib/node_modules/zombie/lib/xhr.js:57:23)
    at XMLHttpRequest.open (/usr/local/lib/node_modules/zombie/lib/xhr.js:74:12)
    at f (https://url.to.some.site/static/js/vendor/respond.min.js:6:748)
    at x (https://url.to.some.site/static/js/vendor/respond.min.js:6:3845)
    at Window.<anonymous> (https://url.to.some.site/static/js/vendor/respond.min.js:6:3923)
    at Window.window._evaluate (/usr/local/lib/node_modules/zombie/lib/document.js:253:155)
    at /usr/local/lib/node_modules/zombie/lib/eventloop.js:77:35
    at Immediate._onImmediate (/usr/local/lib/node_modules/zombie/lib/eventloop.js:676:13)
    at processImmediate [as _immediateCallback] (timers.js:371:17)" 

I have installed:

behat/mink-zombie-driver: ^1.3
behat/mink: ^1.7
iojs: v3.3.1
zombie: v4.2.1

Someone know what to do with this? 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions