public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "ExpectedMessageText")
         {
             ExpectedMessageText = (StringOrRegex)inputParameter.Value;
         }
         else if (inputParameter.Key == "ExpectedDefaultPromptValue")
         {
             ExpectedDefaultPromptValue = (StringOrRegex)inputParameter.Value;
         }
         else if (inputParameter.Key == "ExpectedDialogType")
         {
             ExpectedDialogType = (InsecureDialogType)inputParameter.Value;
         }
         else if (inputParameter.Key == "SetSuccess")
         {
             SetSuccess = (InsecureBool)inputParameter.Value;
         }
         else if (inputParameter.Key == "SetText")
         {
             SetText = (InsecureBool)inputParameter.Value;
         }
         else if (inputParameter.Key == "Text")
         {
             Text = (InsecureText)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 6)
     {
         NewInstance();
     }
 }
Example #2
0
 public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "Url")
         {
             Url = (InsecureText)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 1)
     {
         NewInstance();
     }
 }
Example #3
0
 public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "Selector")
         {
             Selector = (Selector)inputParameter.Value;
         }
         else if (inputParameter.Key == "AttributeName")
         {
             AttributeName = (InsecureText)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 1)
     {
         NewInstance();
     }
 }
 public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "Selector")
         {
             Selector = (Selector)inputParameter.Value;
         }
         else if (inputParameter.Key == "EventScriptBlock")
         {
             EventScriptBlock = (InsecureText)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 2)
     {
         NewInstance();
     }
 }
Example #5
0
 public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "Selector")
         {
             Selector = (Selector)inputParameter.Value;
         }
         else if (inputParameter.Key == "Text")
         {
             Text = (InsecureText)inputParameter.Value;
         }
         else if (inputParameter.Key == "PressEnterAfterwards")
         {
             PressEnterAfterwards = (InsecureBool)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 3)
     {
         NewInstance();
     }
 }
Example #6
0
 public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "ExpectedSchemaType")
         {
             ExpectedSchemaType = (InsecureHttpAuthSchemaType)inputParameter.Value;
         }
         else if (inputParameter.Key == "ExpectedHost")
         {
             ExpectedHost = (StringOrRegex)inputParameter.Value;
         }
         else if (inputParameter.Key == "ExpectedPort")
         {
             ExpectedPort = (InsecureInt)inputParameter.Value;
         }
         else if (inputParameter.Key == "ExpectedRealm")
         {
             ExpectedRealm = (StringOrRegex)inputParameter.Value;
         }
         else if (inputParameter.Key == "Cancel")
         {
             Cancel = (InsecureBool)inputParameter.Value;
         }
         else if (inputParameter.Key == "Username")
         {
             Username = (InsecureText)inputParameter.Value;
         }
         else if (inputParameter.Key == "Password")
         {
             Password = (InsecureText)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 7)
     {
         NewInstance();
     }
 }
        public void CheckRequiredParameters()
        {
            RequiredParameters.Clear();
            if (BrowserActionOrCommand == null)
            {
                return;
            }
            BaseObject baseObject;

            if (BrowserActionOrCommand is BrowserCommand)
            {
                baseObject = (BaseObject)BrowserActionOrCommand;
            }
            else
            {
                baseObject = (BaseObject)((BrowserAction)BrowserActionOrCommand).ActionObject;
            }

            SetAvailableInputParameters();

            foreach (var identifierToObjectKeyValuePair in baseObject.InputParameterAvailable)
            {
                if (identifierToObjectKeyValuePair.Value is InsecureText)
                {
                    foreach (var placeholder in BaseObject.ExtractAllPlaceholdersFromString(((InsecureText)identifierToObjectKeyValuePair.Value).Value))
                    {
                        AddRequiredPlacholder(placeholder);
                    }
                }
                else if (identifierToObjectKeyValuePair.Value is Selector)
                {
                    foreach (var placeholder in BaseObject.ExtractAllPlaceholdersFromString(((Selector)identifierToObjectKeyValuePair.Value).SelectorString))
                    {
                        AddRequiredPlacholder(placeholder);
                    }
                }
                else if (identifierToObjectKeyValuePair.Value is StringOrRegex)
                {
                    foreach (var placeholder in BaseObject.ExtractAllPlaceholdersFromString(((StringOrRegex)identifierToObjectKeyValuePair.Value).Value.Value))
                    {
                        AddRequiredPlacholder(placeholder);
                    }
                }
                else if (identifierToObjectKeyValuePair.Value is InsecureInt)
                {
                }
                else if (identifierToObjectKeyValuePair.Value is InsecureHttpAuthSchemaType)
                {
                }
                else if (identifierToObjectKeyValuePair.Value is InsecureDialogType)
                {
                }
                else if (identifierToObjectKeyValuePair.Value is InsecureBool)
                {
                }
                else if (identifierToObjectKeyValuePair.Value is List <object> )
                {
                    foreach (var heldObject in ((List <object>)identifierToObjectKeyValuePair.Value))
                    {
                        if (heldObject is InsecureText)
                        {
                            InsecureText insecureText = (InsecureText)heldObject;
                            foreach (var placeholder in BaseObject.ExtractAllPlaceholdersFromString(insecureText.Value))
                            {
                                AddRequiredPlacholder(placeholder);
                            }
                        }
                        if (heldObject is InsecureImage)
                        {
                            InsecureImage insecureImage = (InsecureImage)heldObject;
                            foreach (var placeholder in BaseObject.ExtractAllPlaceholdersFromString(insecureImage.Base64EncodedImage))
                            {
                                AddRequiredPlacholder(placeholder);
                            }
                        }
                    }
                }
            }
        }