You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in the process of replacing selenium with cuprite for my Rails system tests. I have a green CI with selenium, but when I switch to cuprite I start getting a lot of errors like this:
Test:
within ".modal-body-confirmation" do
click_button "Yes, delete"
end
Message
Capybara::Ambiguous: Ambiguous match, found 3 elements matching visible css ".modal-body-confirmation"
After checking, I discovered that I had 3 .modal-body-confirmation elements inside 3 different detail tags, but only 1 of those tags was open. So it seems that this file used for the specs needs to be updated to include a test for closed detail tags.
This is an extraction of what the HTML looked like at the failure. You can see 2 modal-body-confirmation but only whose parent detail element is open.
<detailsopen=""><summaryclass="modal-trigger"><buttonclass="" title="Recomeçar lista de presentes"><span>Recomeçar lista de presentes</span></button></summary><divclass="modal-content pos-1001"><divclass="modal-body modal-body-confirmation"><!-- Redacted --></div></div></details><details><summaryclass="modal-trigger"><divclass="" title="Remover loja"><span>Remover loja</span></div></summary><divclass="modal-content pos-1001"><divclass="modal-body modal-body-confirmation"><!-- Redacted --></div></div></details>
The text was updated successfully, but these errors were encountered:
I'm in the process of replacing selenium with cuprite for my Rails system tests. I have a green CI with selenium, but when I switch to cuprite I start getting a lot of errors like this:
Test:
Message
After checking, I discovered that I had 3
.modal-body-confirmation
elements inside 3 differentdetail
tags, but only 1 of those tags was open. So it seems that this file used for the specs needs to be updated to include a test for closed detail tags.This is an extraction of what the HTML looked like at the failure. You can see 2 modal-body-confirmation but only whose parent detail element is open.
The text was updated successfully, but these errors were encountered: