Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watin Runscript No Wait

In Watin, as we 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.

like image 248
Praveen Avatar asked Apr 18 '26 21:04

Praveen


1 Answers

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);                        
like image 68
Jeffrey Harrington Avatar answered Apr 21 '26 10:04

Jeffrey Harrington