src/Context/Select2Context.php
private function waitForLoadingResults($time)
    {
        for ($i = 0; $i < $time; $i++) {
            if (!$this->getSession()->getPage()->find('css', '.select2-results__option.loading-results')) {
                return;
            }

            sleep(1);
        }
    }
private function waitForLoadingResults($time)
    {
        for ($i = 0; $i < $time; $i++) {
            if (!$this->getSession()->getPage()->find('css', '.select2-results__option.loading-results')) {
                return;
            }

            sleep(1);
        }
    }
private function waitForLoadingResults ( $ time ) { for ( $ i = 0 ; $ i < $ time ; $ i ++ ) { if ( ! $ this -> getSession ( ) -> getPage ( ) -> find ( 'css' , '.select2-results__option.loading-results' ) ) { return ; } sleep ( 1 ) ; } }
Wait the end of fetching Select2 results

@param int $time Time to wait in seconds
Wait the end of fetching Select2 results