public void FireEventNoWait(string eventName, NameValueCollection eventProperties) { var scriptCode = CreateJavaScriptFireEventCode(eventProperties, eventName); var asyncScriptRunner = new AsyncScriptRunner(scriptCode.ToString(), _ieElement.ParentWindow); UtilityClass.AsyncActionOnBrowser(asyncScriptRunner.FireEvent); }
/// <inheritdoc /> public void FireEventNoWait(string eventName, NameValueCollection eventProperties) { var scriptCode = IEUtils.CreateJavaScriptFireEventCode(eventProperties, AsDispHTMLBaseElement, eventName); var window = ((IHTMLDocument2)AsDispHTMLBaseElement.document).parentWindow; var asyncScriptRunner = new AsyncScriptRunner(scriptCode.ToString(), window); UtilityClass.AsyncActionOnBrowser(asyncScriptRunner.FireEvent); }
public void FireEventAsync(string eventName, NameValueCollection eventProperties) { StringBuilder scriptCode = UtilityClass.CreateJavaScriptFireEventCode(eventProperties, DispHtmlBaseElement, eventName); IHTMLWindow2 window = ((IHTMLDocument2)DispHtmlBaseElement.document).parentWindow; AsyncScriptRunner asyncScriptRunner = new AsyncScriptRunner(scriptCode.ToString(), window); UtilityClass.AsyncActionOnBrowser(new ThreadStart(asyncScriptRunner.FireEvent)); }
public bool HandledOnClick(string eventname, bool noWait) { if (eventname.ToLower() == "onclick") { if (!noWait) { _ieElement.ClickOnElement(); } else { UtilityClass.AsyncActionOnBrowser(_ieElement.ClickOnElement); } return(true); } return(false); }