소프트 어설 션 중 하나가 실패하더라도 테스트가 계속됩니다. 하지만 내 경우에는 다음 테스트 요소를 찾을 수 없으므로 소프트 테스트가 실패한 후 내 테스트가 중단됩니다.softAssert 실패 후 요소를 찾을 수 없습니다.
softAssert.assertTrue(p.OtsPage.fName().getAttribute("readonly").equals("true"), "field Name is Editable", "field Name is Read Only");
softAssert.assertTrue(p.OtsPage.fEditValue().isEnabled(), "field Edit Value is not Editable", "field Edit Value is Editable");
이 제대로 작동하지만 내가 설정 한 경우 :
org.openqa.selenium.NoSuchElementException :
softAssert.assertFalse(p.OtsPage.fName().getAttribute("readonly").equals("true"), "field Name is Editable", "field Name is Read Only"); softAssert.assertFalse(p.OtsPage.fEditValue().isEnabled(), "field Edit Value is not Editable", "field Edit Value is Editable");
을 나는 다음과 같은 오류 메시지가 있습니다. 두 번째 소프트 어설트 !!!
및 테스트가 중지됩니다.
환경 : Selenium 3.5 + geckodriver + Mozilla 56.0.1.