Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

InnerBrowser fillField throws exception if input does not have a name attribute

Đang mở
#24 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php, symfony
Lĩnh vực
testing

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Codeception/lib-innerbrowser

Tất cả issue của Codeception/lib-innerbrowser

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.