how to wait until the textbox enable in watin

后端 未结 4 1559
予麋鹿
予麋鹿 2021-01-29 02:10

i have one textbox on my page on the load event textbox is disable for 10 then its enable so how to wait for 10 sec in watin. i am try to this code

IE ie = new I         


        
4条回答
  •  青春惊慌失措
    2021-01-29 02:24

    If it is ran when the webpage loads you could probably just use this:

    ie.WaitForComplete();
    

    Wait for complete will make the test wait until all of the elements and frames are loaded before carrying out the next task, in your case locating the textbox for input.

    The only problem I have with putting the thread to sleep is that it can take a bit longer than you may need. This way you know it is running as soon as the page is done. (Which may vary a bit).

提交回复
热议问题