Esempio n. 1
0
        public void ShowRecorder(object sender, EventArgs e, IfrmCommandEditor editor, ICommandControls commandControls)
        {
            //create recorder
            IfrmWebElementRecorder newElementRecorder = commandControls.CreateWebElementRecorderForm(editor.HTMLElementRecorderURL);

            newElementRecorder.ScriptContext = editor.ScriptContext;
            newElementRecorder.CheckBox_StopOnClick(true);
            //show form
            ((Form)newElementRecorder).ShowDialog();

            editor.HTMLElementRecorderURL = newElementRecorder.StartURL;

            try
            {
                if (newElementRecorder.SearchParameters != null)
                {
                    v_SeleniumSearchParameters.Rows.Clear();

                    foreach (DataRow rw in newElementRecorder.SearchParameters.Rows)
                    {
                        v_SeleniumSearchParameters.ImportRow(rw);
                    }
                }
            }
            catch (Exception)
            {
                //Search parameter not found
            }

            commandControls.AddIntellisenseListBoxToCommandForm();
        }
        public void ShowRecorder(object sender, EventArgs e, IfrmCommandEditor editor, ICommandControls commandControls)
        {
            //create recorder
            IfrmWebElementRecorder newElementRecorder = commandControls.CreateWebElementRecorderForm(editor.HTMLElementRecorderURL);

            newElementRecorder.ScriptElements = editor.ScriptEngineContext.Elements;
            newElementRecorder.CheckBox_StopOnClick(true);
            //show form
            ((Form)newElementRecorder).ShowDialog();

            editor.HTMLElementRecorderURL       = newElementRecorder.StartURL;
            editor.ScriptEngineContext.Elements = newElementRecorder.ScriptElements;

            try
            {
                if (newElementRecorder.SearchParameters != null)
                {
                    v_SeleniumSearchParameters.Rows.Clear();

                    foreach (DataRow rw in newElementRecorder.SearchParameters.Rows)
                    {
                        v_SeleniumSearchParameters.ImportRow(rw);
                    }

                    _searchParametersGridViewHelper.DataSource = v_SeleniumSearchParameters;
                    _searchParametersGridViewHelper.Refresh();
                }
            }
            catch (Exception)
            {
                //Search parameter not found
            }
        }