这是我需要获取的HTML代码
<ul class="DataView ProductList padded-items js-data-view">
<li class="data-item">
…
</il>
<li class="data-item">
...
</il>
<div class="sto-BF_btf_C36058-w-butterfly">
...
</div>
<li class="data-item">
…
</il>
</ul>
$client = \Symfony\Component\Panther\Client::createChromeClient();
$client->get($url);
$crawler = $client->waitFor('.sto-BF_btf_C36058-w-butterfly'); // doesn't work, element not found
$productlist = $crawler->filter('.ProductList')->html();
echo $productlist;
问题是动态添加的div标签“ sto-BF_btf_C36058-w-butterfly”。
有没有办法等到页面完全加载然后再获取内容?