InnerBrowser fillField throws exception if input does not have a name attribute
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu tại src/Codeception/Lib/InnerBrowser.php quanh dòng 789, sau đó kiểm tra Symfony DomCrawler Form.php quanh dòng 452 và lệnh gọi matchFormField. Tái hiện fillField với một trường biểu mẫu bị thiếu tên hoặc có tên rỗng, và coi vấn đề là đã hoàn tất khi nó không còn gây ra "Malformed field path".
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 :)
- Ngôn ngữ chính
- PHP
- Star
- 87
- Fork
- 20
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Codeception/lib-innerbrowser
-
Suggestion: `seeResponseIsPdf()` Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
Codeception/lib-innerbrowser#31 · 2 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Codeception/lib-innerbrowser#16 · 1 bình luận ·
-
Add `seeSourceEquals()` Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Tất cả issue của Codeception/lib-innerbrowser
Issue tương tự
-
tooling
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ProfessionalWiki/NeoWiki#1525 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
OpenConext/OpenConext-engineblock#2122 ·
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/safe-publish#594 ·