Skip to content
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

Panther only supports getting normalized text #325

Closed
iceuponfire opened this issue Mar 30, 2020 · 4 comments
Closed

Panther only supports getting normalized text #325

iceuponfire opened this issue Mar 30, 2020 · 4 comments

Comments

@iceuponfire
Copy link

iceuponfire commented Mar 30, 2020

since the symfony 4.4.6 update i get the "Panther only supports getting normalized text" when running tests.

Maybe it could be related to symfony/symfony#34151 ??

@lsdlp
Copy link

lsdlp commented Mar 30, 2020

Hello same issue here. i have this error on my test "Panther only supports getting normalized text" when running tests." since the symfony 4.4.6 update

@raphaChoquet
Copy link

raphaChoquet commented Mar 30, 2020

I agree. The problem seem to come from this release.
On constraint, they change :
$crawler->text() by $crawler->text(null, false) however in the Panther crawler if you pass false as second parameter, this throw the exception "Panther only supports getting normalized text" :

public function text(string $default = null, bool $normalizeWhitespace = true): string
{
    if (!$normalizeWhitespace) {
        throw new \InvalidArgumentException('Panther only supports getting normalized text.');
    }
    [...]
}

@iceuponfire
Copy link
Author

image

dom-crawler seem to send false as the second argument?

@iceuponfire
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants