PHP webdriver wait for Ajax to finish executing

前端 未结 1 1488
不思量自难忘°
不思量自难忘° 2021-01-28 19:55

Simply want to check that ajax is no longer executing, but there\'s not much in terms of documentation for this.

Closest answer I found is: phpwebdriver selenium wait for

相关标签:
1条回答
  • 2021-01-28 20:38

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

    $driver->wait()->until(
        function ($driver) {
            return $driver->executeScript('return jQuery.active === 0;');
        }
    );
    
    
    0 讨论(0)
提交回复
热议问题