1
UITest를 성공적으로 전달할 수있는 작업이 있습니다. 예상되는 요소 (제 경우의 경고)가 시간 초과 (서버 요청시) 전에 나타나지 않은 경우.waitForExpectations 실패시 UITest에서 성공하기
코드 :
let element = app.alerts["test text"]
let existsPredicate = NSPredicate(format: "exists == true")
expectation(for: existsPredicate, evaluatedWith: element, handler: nil)
waitForExpectations(timeout: 10, handler: nil)
// when timeout expired test should finish with success
는 인터넷을 통해 해결책을 찾지 못했습니다.
재미 있습니다! 코드 예제를 게시하십시오. – Igor
Brilliant! 그것은 내가 필요한 것! 이 단서를 가져 주셔서 감사합니다! 우편 번호와 나는 당신의 대답을 받아 들일 것입니다. – Igor
직접 추가했습니다. 이전 대답을 삭제하십시오. – Igor