2012-12-06 2 views
3

알 수없는 이유로 인해 응용 프로그램에 로그온하는 데 걸리는 시간이 크게 증가했습니다. 이것은 일반적으로 문제가되지 않습니다. 그러나, 나는 Watin이 시간 초과되는 것을 막는 것처럼 보이지 않습니다.WatIn이 시간 초과되지 않도록하는 방법이 있습니까?

'로그온'버튼을 클릭하면 홈 페이지가 표시 될 때까지 최대 1 분이 소요될 수 있습니다. 나는 다음과 같은 몇 가지 thigs를 시도했다 :

ieInUse.Button (Find.ByValue ("Log On")).

ieInUse.WaitUntilContainsText ("홈 페이지의 텍스트"); .

이나 뭐 같은 ...

ieInUse.Button (Find.ByValue ("로그온이"))를 클릭합니다();

ieInUse.WaitForComplete (100000);

그러나 테스트는 여전히 오류와 함께 실패 :

WatiN.Core.Exceptions.TimeoutException : 제한 시간을 완전한 문서 상태를 기다리는 동안. 마지막 상태가 '로딩'이었습니다

답변

6

ie를 개체를 초기화하기 전에이 watin 설정을 사용하여 시간 초과를 늘리십시오.

Settings.AttachToBrowserTimeOut = 240; //240 seconds 
    Settings.WaitUntilExistsTimeOut = 240; 
    Settings.WaitForCompleteTimeOut = 240; 
0

는 확실히 그 답변을 늦게 모르지만, 나 자신에게 같은 질문을하고 Watin 2.0 릴리스 노트에 답을 찾았습니다

Previous versions of WatiN would wait until IE and the DOM document got into the ‘ready’ state. More and more websites never reach this state for instance because of adds constantly loading. WatiN will now wait for IE and the DOM Document to get to the ‘interactive’ or ‘ready’ state to avoid unnecessary time-outs, and to be more responsive.

http://watin.org/documentation/release-2-0-50-11579/

그래서 버전을 확인 당신 사용하고 있습니다. 희망이 사람을 도움이됩니다.

관련 문제