Closed ChipCoons closed 4 years ago
@ChipCoons thank you for open the issue. I believe the problem is that you are using a ID selector
instead of a attribute selector
targeting the name="_csrf"
.
Please try this:
Floki.find(form_body, "input[name=_csrf]")
I'm closing the issue.
That worked. Thanks. Thanks for making a great library as well.
-Chip
On Jun 12, 2020, at 4:13 PM, Philip Sampaio notifications@github.com wrote:
input[name=_csrf]
Description
When using Floki.find(fragment, "#name) where name is the name of an attribute of type="hidden", an empty list is returned.
To Reproduce
Steps to reproduce the behavior:
With this code:
Actual Result
[]
Expected behavior
[ {"input", [ {"type", "hidden"}, {"value", "2736e8e5-7c83-49c1-922e-e00a8fa967e5"}, {"name", "_csrf"} ], [] } ]
If I use the find function on any non-hidden, named field, I get the expected results.