Codeception / Codeception/module-webdriver

`click()` doesn't find `<summary>`, `<label>`, or elements inside `<a>`

Đang mở
#18 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
PHP
Star
39
Fork
25
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The HTML5 element `` is missing from the list of clickable elements at [`WebDriver::_findClickable()`](https://github.com/Codeception/module-webdriver/blob/master/src/Codeception/Module/WebDriver.php#L1047)

I tried to add it there just like the others: `".//summary[normalize-space(.)=$locator]",` - but this doesn't really fix it, since there are many elements allowed inside ``: https://html.spec.whatwg.org/#the-summary-element

I think this needs to be refactored, since (from looking at the code) elements inside `` are also not matched, e.g. `

...
` - which is valid HTML 5: https://html.spec.whatwg.org/#the-a-element

So I guess the arguments that are thrown into `Locator::combine()` need to be replaced by functions to allow more complex matching logic.

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

Hướng nghiên cứu

Bắt đầu trong src/Codeception/Module/WebDriver.php tại WebDriver::_findClickable(), sau đó kiểm tra cách Locator::combine() được sử dụng. Tái hiện các lần nhấp cho , và các phần tử được lồng bên trong ; hoàn tất nghĩa là các đích có thể nhấp hợp lệ của HTML5 được định vị một cách nhất quán thay vì chỉ khớp với văn bản trực tiếp của container.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
html, php
Lĩnh vực
testing-qa
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

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.