-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html() function of the DomCrawler doesn't returning anything after calling filter function #478
Comments
I'm experiencing the exact same problem since Chrome 91. Have you found any workarounds? |
I have the same issue. On my computer, tests are working because I have an older Chrome version. But when testing on GitHub Actions, filter + html returns empty. |
Encountered this issue as well |
I also encounter this problem. |
Any news on this issue? How are people able to still use the DomCrawler with this problem? For me unfortunately Panther became practically useless. |
It's not a bug, it's a feature... I did some research and found a solution! ChromeDriver 91 (and up) became compliant with the W3C standard regarding the "Get Element Attribute". That's nice, but unfortunately this breaks our tests. But: there's a simple solution. ChromeDriver only follows this W3C standard when the driver is in W3C mode. By disabling that mode Panther will work as before. This will do the trick:
|
Guys help me please where should I put above mentioned code in my code so I could fetch only data I need
Thank you! |
Into where you are initializing the client
|
We have noticed a change of behaviour since upgrading to chrome v91 as our client. The html function has an odd behaviour.
The below returns the html correctly:
dump($client->getCrawler()->html());
But then after appling a filter the html function always returns an empty string.
$client->getCrawler()->filter("table.statistic-table thead th")->each(
function (Crawler $tr) use (&$headers) {
dump($tr->html());
});
Anyone else is experiencing this? We have had to mitigate this by calling the text function instead. But that itself presents another problem because when the text is hidden in a scrollable section, the text function also returns and empty string.
The text was updated successfully, but these errors were encountered: