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.

The "wait()" does not work, when Zombie has empty event loop #167

@Ventzy

Description

@Ventzy

It seems that wait() does not work, or I expect different behavior. I could not find any docs for browser.wait method in Zombie.

So... I expect when I do $session->wait(10000); php script to "sleep" for 10 seconds and then resume. But it does not happen. Am I missing something?

My use case is exactly as comment in Mink wait method - "Waits some time or until JS condition turns true." And I have it like that:

$session->wait(
    1000,
    "document.querySelector('.some-selector') !== null"
);

I want, if .some-selector appears on the page in next 1 second to get true, and if not - get false. But it does not wait a second and returns right away with false.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions