`selectOption()` not working with Bootrap's `radio-custom` radiobuttons
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- bootstrap, php
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu từ các điểm vào của module WebDriver được nêu trong báo cáo: selectOption() và click(), rồi tái hiện lỗi với radio button custom-control-input của Bootstrap và label của nó. So sánh workaround hiện có cho label với thao tác nhấp vào input bị chặn, sau đó xác minh rằng option mong muốn được chọn mà không làm hỏng các tương tác radio button thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have a Bootstrap custom radio button:
<div class="custom-control custom-radio">
<input type="radio" id="form_foo_0" name="form[foo]" value="Whatever" class="custom-control-input">
<label for="form_foo_0" class="radio-custom custom-control-label required">Whatever</label>
</div>
When I do this in an acceptance test:
$I->selectOption('input[name="form[foo]"]', 'Whatever:');
or
$I->click(['css' => '#form_foo_0']);
...I'm getting:
[Facebook\WebDriver\Exception\ElementClickInterceptedException] element click intercepted:
Element <input type="radio" id="form_foo_0" name="form[foo]" value="Whatever" class="custom-control-input"> is not clickable at point (44, 1171).
Other element would receive the click:
<label for="form_foo_0" class="radio-custom custom-control-label required">...</label>
(Session info: chrome=85.0.4183.83)
The workaround I'm using now is to click the label:
$I->click(['css' => 'label[for="form_foo_0"]']);
Due to the popularity of Bootstrap I'm wondering if an out-of-the-box solution would be better in this case.
P.S.: I don't know why I have the class radio-custom on the <label> - it's created by Symfony's Bootstrap form theme
- 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
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/module-webdriver
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Codeception/module-webdriver#151 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Codeception/module-webdriver#135 ·
-
Example of `executeAsyncJs()` Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
Codeception/module-webdriver#130 ·
-
Bug: `MalformedLocatorException` thrown for `id`s that don't start with a character (HTML 5) Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Codeception/module-webdriver#128 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
Codeception/module-webdriver#126 ·
Tất cả issue của Codeception/module-webdriver
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Admissions heading updates Đang mởa11y admissions.uiowa.edu needs grooming SiteImprove best practice
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Save States Menu Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Error on exporting the error log Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pluginsGLPI/datainjection#673 ·