Returns the current Crawler instance.
public getCrawler ( ) : |
||
Результат | A Crawler instance |
/** * @param $client * @param $position 0 based index position * @return mixed */ private function getPageEditUriFromListByPosition(Client $client, $position) { $crawler = $client->getCrawler(); if (strpos($client->getRequest()->getUri(), '/admin/cmf/page/page/list') === false) { $crawler = $client->request('GET', '/admin/cmf/page/page/list'); } $this->assertTrue($client->getResponse()->isSuccessful()); $rows = $crawler->filter('table tbody tr'); return $rows->eq($position)->filter('td')->eq(1)->filter('a')->attr('href'); }