コード例 #1
0
        private void elementRecorderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmHTMLElementRecorder elementRecorder = new frmHTMLElementRecorder();

            elementRecorder.ScriptElements = _scriptElements;
            elementRecorder.ShowDialog();
            CreateUndoSnapshot();
            _scriptElements = elementRecorder.ScriptElements;
        }
コード例 #2
0
        public void ShowRecorder(object sender, EventArgs e, IfrmCommandEditor editor)
        {
            //create recorder
            frmHTMLElementRecorder newElementRecorder = new frmHTMLElementRecorder();

            newElementRecorder.ScriptElements = editor.ScriptElements;

            //show form
            newElementRecorder.ShowDialog();

            editor.ScriptElements = newElementRecorder.ScriptElements;

            try
            {
                string seleniumSearchType = Regex.Matches(v_SeleniumSearchType, @"(?<=By )[\w\s]+")[0].ToString();
                var    searchParameter    = newElementRecorder.SearchParameters.AsEnumerable().Where(s => s[0].ToString() == seleniumSearchType).SingleOrDefault();
                _searchParameterControls[3].Text = searchParameter[1].ToString();
            }
            catch (Exception)
            {
                //Search parameter not found
            }
        }