내 카피 바라 시험이 라인을 포함 찾을 수 없습니다 :카피 바라 + 셀레늄 : save_and_open_page 버튼을 보여 주지만, 카피 바라가
click_button "SHARE"
fill_in 'Email Address', :with => @user_two.email
save_and_open_page
click_button 'CONFIRM'
공유 버튼을 모달 볼 수 있도록한다. 이 모달의 이메일 주소 텍스트 상자에 작성하여 차질없이 터질 것 같다,하지만 난 save_and_open_page 때 나는, 그러나 버튼
Capybara::ElementNotFound:
Unable to find button "CONFIRM"
에 대한 다음과 같은 오류가 발생, 버튼을 볼 수 있습니다.
나는
page.find("#id-of-button").click
로 전환하려고했지만 카피 바라가 그 중 하나를 찾을 수 없습니다.
그것은 save_and_open_page 나에게 이메일에 대한 필드가 채워되지 않은 페이지를 보여줍니다 유의.
을 내가 그 페이지 인 경우 때문에 카피 바라가 얼마나 save_and_open_page 작품에 대한 기본 뭔가 빠진 것 같아요 흥미로운 그 전체에보고는 이러한 오류는 ... 나에게 아무 의미도하지 않습니다
편집 : 소스 코드 버튼
생성 :.title.aaux
Title
.content
.line-separator
#intro
Enter Email:
= form_for(patient, url: {controller: "dashboard/patients", action: "share_with_user"}, method: :post, html: {id: "share-patient-form"}) do |f|
%fieldset.bordered
= f.text_field :share_user_email, placeholder: "Email Address", class: "aaux form-control"
.line-separator
#button-row
%button.btn.btn-success.aaux.pull-right#confirm-share-patient{type: "submit"}
CONFIRM
%button.btn.btn-cancel.aaux.pull-right#close-modal-share-patient
CANCEL
편집 모달 뷰 코드3210
<button type="submit" id="confirm-share-patient-button" class="btn btn-success aaux pull-right">
CONFIRM
</button>
보기 코드를 공유하십시오. –
채팅을 통해이 문제에 대해 토론 할 수 있습니다. http://chat.stackoverflow.com/rooms/48530/ror –
채팅 할 수 없다면 '버튼 확인'을 위해 생성 된 HTML 소스 코드를 공유하십시오. –