watiN에서 WaitforComplete()을 사용하고 있지만 잘 작동하지 않는 것 같습니다. 기다릴 시간을 더 주더라도 다음 명령문을 실행합니다. thread.sleep()을 사용하여 원하는 페이지 나 요소를 얻을 때까지 응용 프로그램을 중지합니다. 하지만 문제는 페이지가 너무 동적이어서 때로는 지정된 시간이 오래 걸리는 경우입니다.페이지의 요소를 기다리는 더 좋은 방법은 무엇입니까 Waitforcomplete() 또는 system.threading.thread.sleep()
더 나은 해결책. 페이지를 잡는 모든 것들이 동적으로 돌아오고 응용 프로그램에서 다음 문장을 실행하지 않습니다.
'Show Details page
Assert.AreEqual("Confirmation", _internetExplorer.Title)
If (_internetExplorer.Button(Find.ById(New Regex("btnFinish"))).Exists) Then
_internetExplorer.Button(Find.ById(New Regex("btnFinish"))).Click()
Else
Assert.Fail("Could not Find Finish Booking Button on Confirmation Page")
End If
System.Threading.Thread.Sleep(100000)
'쇼 예약 요약 페이지 Assert.AreEqual ("디스플레이 예약", _internetExplorer.Title)
코드의샘플 동적으로 페이지의 반환을 감지 무언가를 원한다. 어떤 상수 값을주는 대신에.