I need click a button 'Vew more' in my page, but not is a form, is a button type "button".
My code's look:
$client = new Client();
$crawler = $client->request('GET', 'https://www.xxxx.com');
$button = $crawler->selectButton('View more');
$client->click($button);
This returns:
Catchable fatal error: Argument 1 passed to Symfony\Component\BrowserKit\Client::click() must be an instance of Symfony\Component\DomCrawler\Link, instance of Symfony\Component\DomCrawler\Crawler given, called in C:\xampp\htdocs\scrapper\index.php on line 17 and defined in C:\xampp\htdocs\scrapper\vendor\symfony\browser-kit\Client.php on line 238
Any ideas? :(