InnerBrowser fillField throws exception if input does not have a name attribute
还没有人认领这个 Issue。
评估
调研方向
从 src/Codeception/Lib/InnerBrowser.php 第789行附近开始,然后检查 Symfony DomCrawler Form.php 第452行附近以及对 matchFormField 的调用。使用名称缺失或为空的表单字段复现 fillField,并在不再引发 "Malformed field path" 时认为该问题已解决。
由索引模型根据 Issue 内容生成。
描述
This issue comes from the problem reported in Codeception/Codeception#1221. You will get an exception with the text InvalidArgumentException: Malformed field path "" if you call fillField for a form field without a name attribute or an empty name attribute.
This comes from the fact that the call to matchFormField at https://github.com/Codeception/Codeception/blob/2.1/src/Codeception/Lib/InnerBrowser.php#L789 uses the value of the name attribute to access the fields in a \Symfony\Component\DomCrawler\Form object.
However, this Form object will not store form fields that do not have a value for their name attribute, see this line of code: https://github.com/symfony/dom-crawler/blob/master/Form.php#L452.
I don't see an easy workaround for this problem, but maybe someone else does, maybe @Naktibalda or @DavertMik? I am not really familiar with this part of the Codeception codebase :)
- 主要语言
- PHP
- 星标
- 87
- 派生
- 20
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Codeception/lib-innerbrowser 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 48/100
-
难度 3/5 1-2 天 新手友好度 42/100
-
难度 2/5 1-3 小时 新手友好度 35/100
Codeception/lib-innerbrowser#31 · 2 条评论 ·
-
enhancement
难度 3/5 1-2 天 新手友好度 35/100
Codeception/lib-innerbrowser#16 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
查看 Codeception/lib-innerbrowser 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
sync-en
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复
-
[Area] REST API [Type] Documentation Good First Issue
难度 1/5 1-3 小时 新手友好度 90/100
WordPress/presence-api#584 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100