/// <summary>
        /// Runs the application
        /// </summary>
        internal void RunApplication()
        {
            //			if ( _scriptingArgumentsDef == null )
            //			{
            //				_scriptingArgumentsDef = _scriptingData.CreateArgumentDefinition();
            //			}
            //			else
            //			{
            //				_scriptingArgumentsDef = _scriptingData.UpdateArgumentDefinition(_scriptingArgumentsDef);
            //			}
            ScriptingApplicationArgumentForm inputForm = new ScriptingApplicationArgumentForm(_scriptingData,null);

            if ( inputForm.ShowDialog() == DialogResult.OK )
            {
                TestRequestDialog testRequestDialog = new TestRequestDialog();
                testRequestDialog.Show();
                testRequestDialog.TestRequestUntilIndex(inputForm.ScriptingApplication, inputForm.ScriptingApplication.WebRequests.Length-1);
            }

            //			if ( _scriptingArgumentsDef.WebRequestArguments.Length > 0 )
            //			{
            //
            //			}
            //			else
            //			{
            //				// Display message
            //				MessageBox.Show("There are no arguments assigned for this scripting application.", AppLocation.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
            //			}
        }
 /// <summary>
 /// Removes a session request from the session.
 /// </summary>
 /// <param name="sender"> The sender object.</param>
 /// <param name="e"> The event arguments.</param>
 private void mnuTestSessionRequest_Click(object sender, System.EventArgs e)
 {
     if ( tvSessionTree.Nodes[0].Nodes.Count > 0 )
     {
         int index = tvSessionTree.Nodes[0].Nodes.IndexOf(tvSessionTree.SelectedNode);
         TestRequestDialog testRequestDialog = new TestRequestDialog();
         testRequestDialog.Show();
         testRequestDialog.TestRequestUntilIndex(_scriptingData, index);
     }
 }
        private void mnuRun_Click(object sender, System.EventArgs e)
        {
            _selectedApplicationFilePath =
                GetSelectedApplicationFilePath();

            ScriptingApplicationArgumentForm inputForm = new ScriptingApplicationArgumentForm();
            inputForm.RunScriptingApplication(_selectedApplicationFilePath);

            if ( inputForm.ShowDialog() == DialogResult.OK )
            {
                TestRequestDialog testRequestDialog = new TestRequestDialog();
                testRequestDialog.Show();

                int length = inputForm.ScriptingApplication.WebRequests.Length;
                if ( inputForm.ScriptingApplication.WebRequests.Length > 0 )
                {
                    length = length - 1;
                }
                testRequestDialog.TestRequestUntilIndex(inputForm.ScriptingApplication, length);
            }
        }