php webdriver waits for ajax to finish execution

If you are doing AJAX requests using jQuery, you can use this:

$driver->wait()->until(
    function ($driver) {
        return $driver->executeScript('return jQuery.active === 0;');
    }
);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top