Exemplo n.º 1
0
        public void FireEventNoWait(string eventName, NameValueCollection eventProperties)
        {
            var scriptCode = CreateJavaScriptFireEventCode(eventProperties, eventName);

            var asyncScriptRunner = new AsyncScriptRunner(scriptCode.ToString(), _ieElement.ParentWindow);

            UtilityClass.AsyncActionOnBrowser(asyncScriptRunner.FireEvent);
        }
Exemplo n.º 2
0
        /// <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));
        }
Exemplo n.º 4
0
        public bool HandledOnClick(string eventname, bool noWait)
        {
            if (eventname.ToLower() == "onclick")
            {
                if (!noWait)
                {
                    _ieElement.ClickOnElement();
                }
                else
                {
                    UtilityClass.AsyncActionOnBrowser(_ieElement.ClickOnElement);
                }

                return(true);
            }
            return(false);
        }