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

selectFieldOption breaks if null value passed #773

Open
DonCallisto opened this issue Jan 17, 2019 · 0 comments
Open

selectFieldOption breaks if null value passed #773

DonCallisto opened this issue Jan 17, 2019 · 0 comments

Comments

@DonCallisto
Copy link

DonCallisto commented Jan 17, 2019

I think that we should normalize the value to empty string if null is passed.
If you need a working example, I'll provide it in the week end but it is pretty clear looking at
https://github.com/minkphp/Mink/blob/master/src/Selector/NamedSelector.php#L208
and
https://github.com/minkphp/Mink/blob/master/src/Selector/NamedSelector.php#L224

Basically, %locator% are never replaced and so no possible way to produce a valid xpath.

If value normalization is note feasabe (as empty string could be a valid use case?) we should throw an exception.

If you all agree to replace null with empty string (or to throw an exception), I'll be happy to make a PR.

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

1 participant