In Watin, as w开发者_Python百科e have for button.Click()
and button.ClickNoWait()
methods. How can we have this for ie.Runscript("Script")
.
In the script run actually a modal popup is opened, because NoWait
or equivalent is not available I cannot handle the modal popup :(
Can anyone please suggest me.
One way you can get around this is to wrap your script code with JavaScript's settimeout() function and then run that via WatiN.
string timed = string.Format("setTimeout(\"{0}\", 500);", script);
Document.RunScript(timed);
精彩评论