Esempio n. 1
0
        public override void SetContext(StepEditContext context, EmailNotification notification)
        {
            base.SetContext(context, notification);

            cbSmtpPresets.DataSource = Enum.GetValues(typeof(SMTPPresets));

            if (notification.SmtpHost != null && notification.SmtpHost.ToLower() == "smtp.gmail.com" &&
                notification.SmtpPort == 587 &&
                notification.UseSSL)
            {
                cbSmtpPresets.SelectedItem = SMTPPresets.Gmail;
            }
            else
            {
                cbSmtpPresets.SelectedItem = SMTPPresets.Custom;
            }

            txtSmtpHost.Text     = notification.SmtpHost;
            nudSmtpPort.Value    = notification.SmtpPort;
            cbSmtpSSL.Checked    = notification.UseSSL;
            txtSmtpUsername.Text = notification.SmtpUsername;
            txtSmtpPassword.Text = notification.SmtpPassword;

            txtFromAddress.Text            = notification.FromAddress;
            txtFromAddressDisplayName.Text = notification.FromAddressDisplayName;
            txtToAddresses.Text            = String.Join("; ", notification.ToAddresses);
        }
Esempio n. 2
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            setValueSelector.SetContext(Step.Mode, m_ElementIdentifier, Step.AttributeName);
            setValueEditor.SetContext(StepEditContext.StateVariables, Step.Value, Step.TrimVariableValueWhitespace);
        }
Esempio n. 3
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            urlEditor.SetContext(StepEditContext.StateVariables, Step.URL, Step.TrimVariableValueWhitespace);
            cbWaitType.SelectedValue = Step.WaitType;
        }
Esempio n. 4
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            m_Notifications = Step.Notifications.Select(n => n.Clone()).ToList();
            zRefreshNotifications();

            messageEditor.SetContext(StepEditContext.StateVariables, Step.Message, Step.TrimVariableValueWhitespace);
        }
Esempio n. 5
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            m_Iteration = Step.Iteration;
            if (m_Iteration != null)
            {
                cbIteration.SelectedValue = m_Iteration.GetType();
            }
        }
Esempio n. 6
0
        public override void SetContext(StepEditContext context, TableResultMapping mapping)
        {
            base.SetContext(context, mapping);

            txtObjectClassName.Text = mapping.ObjectSetClassName;
            cbListName.BindEditableStateVariables(context.StateVariables.Lists(), mapping.ObjectSetListName, true);
            cbPersistList.Checked  = mapping.PersistenceMode == PersistenceMode.Persisted;
            cbIncludeInXML.Checked = mapping.IncludeInXML;

            m_TableResultMapping = mapping.TableMapping.Select(trm => trm.Clone()).ToList();
            zRefreshTableResults();
        }
Esempio n. 7
0
        public static StepEditor GetResultMappingEditor(StepEditContext context, ResultMapping resultMapping)
        {
            if (resultMapping is ScalarResultMapping)
            {
                return(new ScalarResultMappingEditor(context, (ScalarResultMapping)resultMapping));
            }
            if (resultMapping is TableResultMapping)
            {
                return(new TableResultMappingEditor(context, (TableResultMapping)resultMapping));
            }

            throw new NotSupportedException();
        }
Esempio n. 8
0
        public GetValueSuggestor(StepEditContext stepEditContext, ElementIdentifier elementIdentifier, ElementValueMode elementValueMode, string attributeName)
            : this()
        {
            m_StepEditContext = stepEditContext;
            GroupStep parentGroupStep = AutomationUtils.GetParentGroupStep(m_StepEditContext.Sequence, m_StepEditContext.Step);

            if (parentGroupStep != null && parentGroupStep.Iteration != null && parentGroupStep.Iteration is ElementSetIteration)
            {
                m_GroupStepEditContext = new StepEditContext(parentGroupStep, m_StepEditContext.Sequence, m_StepEditContext.StepIndex, m_StepEditContext.StateVariables);
            }
            m_ElementIdentifier = elementIdentifier;
            m_ElementValueMode  = elementValueMode;
            m_AttributeName     = attributeName;
        }
Esempio n. 9
0
        public static StepEditor GetNotificationEditor(StepEditContext context, Notification notification)
        {
            if (notification is EmailNotification)
            {
                return(new EmailNotificationEditor(context, (EmailNotification)notification));
            }
            if (notification is SMSNotification)
            {
                return(new SMSNotificationEditor(context, (SMSNotification)notification));
            }
            if (notification is PopupNotification)
            {
                return(new PopupNotificationEditor(context, (PopupNotification)notification));
            }

            throw new NotSupportedException();
        }
Esempio n. 10
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            m_ElementIdentifier = Step.Element != null?ElementIdentifier.Copy(Step.Element) : new ElementIdentifier();

            txtElementPath.Text      = m_ElementIdentifier.PrimaryIdentifier;
            rbStaticElement.Checked  = Step.ElementType == ElementType.Static;
            rbDynamicElement.Checked = Step.ElementType == ElementType.Dynamic;
            ipPollingTimeout.Enabled = rbDynamicElement.Checked;
            if (rbDynamicElement.Checked && Step.PollingTimeout != null)
            {
                ipPollingTimeout.SetValue(Step.PollingTimeout.Value);
            }
            else
            {
                ipPollingTimeout.SetValue(TimeSpan.FromSeconds(5));
            }
        }
Esempio n. 11
0
        public override void SetContext(StepEditContext context, SMSNotification notification)
        {
            base.SetContext(context, notification);

            cbTextbeltPresets.DataSource = Enum.GetValues(typeof(TextbeltPresets));

            if (notification.TextbeltAPIURL != null && notification.TextbeltAPIURL.ToLower() == "http://textbelt.com/text")
            {
                cbTextbeltPresets.SelectedItem = TextbeltPresets.Paid;
            }
            else
            {
                cbTextbeltPresets.SelectedItem = TextbeltPresets.Custom;
            }

            txtTextbeltAPIURL.Text = notification.TextbeltAPIURL;
            txtTextbeltAPIKey.Text = notification.TextbeltAPIKey;

            txtNumbers.Text = String.Join("; ", notification.Numbers);
        }
        public static StepEditor GetIterationEditor(StepEditContext context, Iteration iteration)
        {
            if (iteration is FixedIteration)
            {
                return(new FixedIterationEditor(context, (FixedIteration)iteration));
            }
            if (iteration is ConditionalIteration)
            {
                return(new ConditionalIterationEditor(context, (ConditionalIteration)iteration));
            }
            if (iteration is ElementSetIteration)
            {
                return(new ElementSetIterationEditor(context, (ElementSetIteration)iteration));
            }
            if (iteration is DataSetIteration)
            {
                return(new DataSetIterationEditor(context, (DataSetIteration)iteration));
            }

            throw new NotSupportedException();
        }
Esempio n. 13
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            cbConnectionType.SelectedItem = Step.ConnectionType;
            txtConnectionString.Text      = Step.ConnectionString;
            cbCommandType.SelectedItem    = Step.CommandType;
            commandEditor.SetContext(StepEditContext.StateVariables, Step.Command, Step.TrimVariableValueWhitespace);

            m_InputParameterMapping = Step.InputParameterMapping.Select(pm => pm.Clone()).ToList();
            zRefreshInputParameters();

            m_OutputParameterMapping = Step.OutputParameterMapping.Select(pm => pm.Clone()).ToList();
            zRefreshOutputParameters();

            m_ResultMapping = Step.ResultMapping;
            if (m_ResultMapping != null)
            {
                cbResultType.SelectedValue = m_ResultMapping.GetType();
            }
        }
Esempio n. 14
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            cbVariableName.BindEditableStateVariables(context.StateVariables.Primitives(), Step.StateVariable);
            cbPersistVariable.Checked = Step.PersistenceMode == PersistenceMode.Persisted;

            getValueSelector.SetContext(Step.Mode, m_ElementIdentifier, Step.AttributeName);

            rbXMLElement.Checked   = Step.XMLFieldOutputMode == XMLFieldOutputMode.Element;
            rbXMLAttribute.Checked = Step.XMLFieldOutputMode == XMLFieldOutputMode.Attribute;
            rbXMLNone.Checked      = Step.XMLFieldOutputMode == XMLFieldOutputMode.None;

            m_NormalizationRules = Step.NormalizationRules.Select(nr => nr.Clone()).ToList();
            zRefreshNormalizationRules();
            cbUseNormalizationDefault.Checked = Step.UseNormalizationDefault;
            txtNormalizationDefault.Enabled   = Step.UseNormalizationDefault;
            if (Step.UseNormalizationDefault && !String.IsNullOrEmpty(Step.NormalizationDefault))
            {
                txtNormalizationDefault.Text = Step.NormalizationDefault;
            }
        }
Esempio n. 15
0
        public static StepEditor GetStepEditor(StepEditContext context)
        {
            if (context.Step is NavigateStep)
            {
                return(new NavigateStepEditor(context));
            }
            if (context.Step is ClickStep)
            {
                return(new ClickStepEditor(context));
            }
            if (context.Step is GetValueStep)
            {
                return(new GetValueStepEditor(context));
            }
            if (context.Step is SetValueStep)
            {
                return(new SetValueStepEditor(context));
            }
            if (context.Step is GroupStep)
            {
                return(new GroupStepEditor(context));
            }
            if (context.Step is NotifyStep)
            {
                return(new NotifyStepEditor(context));
            }
            if (context.Step is DatabaseStep)
            {
                return(new DatabaseStepEditor(context));
            }
            if (context.Step is WaitStep)
            {
                return(new WaitStepEditor(context));
            }

            throw new NotSupportedException();
        }
Esempio n. 16
0
        public override void SetContext(StepEditContext context, ElementSetIteration iteration)
        {
            base.SetContext(context, iteration);
            m_ContainerIdentifier = this.Target.ElementSetContainer;
            if (m_ContainerIdentifier != null)
            {
                txtElementSetContainer.Text = m_ContainerIdentifier.PrimaryIdentifier;
                btnEdit.Enabled             = true;
            }
            rbStaticElement.Checked  = this.Target.ElementType == ElementType.Static;
            rbDynamicElement.Checked = this.Target.ElementType == ElementType.Dynamic;
            ipPollingTimeout.Enabled = rbDynamicElement.Checked;
            if (rbDynamicElement.Checked && this.Target.PollingTimeout != null)
            {
                ipPollingTimeout.SetValue(this.Target.PollingTimeout.Value);
            }
            else
            {
                ipPollingTimeout.SetValue(TimeSpan.FromSeconds(5));
            }

            if (this.Target.ObjectSetClassName != null)
            {
                txtObjectClassName.Text = this.Target.ObjectSetClassName;
            }
            if (this.Target.ObjectSetScopeName != null)
            {
                txtScopeName.Text = this.Target.ObjectSetScopeName;
            }

            cbListName.BindEditableStateVariables(this.StepEditContext.StateVariables.Lists(), this.Target.ObjectSetListName, true);

            cbPersistList.Checked = iteration.PersistenceMode == PersistenceMode.Persisted;

            cbIncludeInXML.Checked = iteration.IncludeInXML;
        }
Esempio n. 17
0
        public override void SetContext(StepEditContext context, DataSetIteration iteration)
        {
            base.SetContext(context, iteration);

            m_Loading = true;
            cbListVariableList.DataSource = context.StateVariables.Lists();
            if (iteration.ObjectSetListName != null)
            {
                cbListVariableList.Text = iteration.ObjectSetListName;
            }
            if (iteration.ObjectSetClassName != null)
            {
                cbObjectClassList.Text = iteration.ObjectSetClassName;
            }
            else
            {
                cbObjectClassList.Text = "[Any]";
            }
            if (this.Target.ObjectSetScopeName != null)
            {
                txtScopeName.Text = this.Target.ObjectSetScopeName;
            }
            m_Loading = false;
        }
Esempio n. 18
0
 public SMSNotificationEditor(StepEditContext context, SMSNotification notification)
     : this()
 {
     this.SetContext(context, notification);
 }
Esempio n. 19
0
 public ElementSetIterationEditor(StepEditContext context, ElementSetIteration iteration)
     : this()
 {
     this.SetContext(context, iteration);
 }
Esempio n. 20
0
 public virtual void SetContext(StepEditContext context)
 {
     this.StepEditContext = context;
 }
Esempio n. 21
0
 public DataSetIterationEditor(StepEditContext context, DataSetIteration iteration)
     : this()
 {
     this.SetContext(context, iteration);
 }
Esempio n. 22
0
 public WaitStepEditor(StepEditContext context)
     : this()
 {
     this.SetContext(context);
 }
Esempio n. 23
0
        public override void SetContext(StepEditContext context)
        {
            base.SetContext(context);

            ipWaitDuration.SetValue(Step.Duration);
        }
Esempio n. 24
0
 public NotifyStepEditor(StepEditContext context)
     : this()
 {
     this.SetContext(context);
 }
Esempio n. 25
0
 public NavigateStepEditor(StepEditContext context)
     : this()
 {
     this.SetContext(context);
 }
Esempio n. 26
0
 public FixedIterationEditor(StepEditContext context, FixedIteration iteration)
     : this()
 {
     this.SetContext(context, iteration);
 }
Esempio n. 27
0
 public override void SetContext(StepEditContext context, FixedIteration iteration)
 {
     base.SetContext(context, iteration);
     nudNumberOfIterations.Value = this.Target.Iterations;
 }
Esempio n. 28
0
 public override void SetContext(StepEditContext context)
 {
     base.SetContext(context);
 }
Esempio n. 29
0
 public GroupStepEditor(StepEditContext context)
     : this()
 {
     this.SetContext(context);
 }
Esempio n. 30
0
 public TableResultMappingEditor(StepEditContext context, TableResultMapping mapping)
     : this()
 {
     this.SetContext(context, mapping);
 }