11-04-2015, 04:18 PM
I have script like below. First, it navigates to a page which will redirect to sign in page. After sign in, it should redirect back to this page. Sometimes, it takes long after submitForm step. Then the test is ended and doesn't catch the target page. Sometimes it works well. So the problem is the network timeout in the step "submitForm". I tried adding "setTimeout 10" after "submitForm name=SignInForm". But it doesn't work well. And per the documentation, the timeout is in seconds. However, it will wait for very long even I set it to 2. So I'm not sure how to set such a timeout. I also tried "sleep" and "waitForComplete" but they are not working either. What I need is to have it wait until the submitForm step completes successfully. Anyone can help me out?
logData 1
//Navigate to a page which needs sign in and redirect to sign in page
navigate http://www.xxx.com/aaa/bbb
//sign in
setValue name=userid xxxxx
setValue name=password xxxxx
submitForm name=SignInForm
// Question: How to increase timeout for the step "SubmitForm"?
// After sign in, it should redirect to the original page
logData 1
//Navigate to a page which needs sign in and redirect to sign in page
navigate http://www.xxx.com/aaa/bbb
//sign in
setValue name=userid xxxxx
setValue name=password xxxxx
submitForm name=SignInForm
// Question: How to increase timeout for the step "SubmitForm"?
// After sign in, it should redirect to the original page