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;
         }
     }
     if (InputParameterAvailable.Count != 4)
     {
         NewInstance();
     }
 }
Beispiel #2
0
 public Template(int templateVersion, StringOrRegex boundUrl, string name, PasswordCreationPolicy passwordCreationPolicy, List <TemplateElement> templateElements, int maxTries = 3) : base()
 {
     GenerateNewUtid();
     TemplateVersion        = templateVersion;
     BoundUrl               = boundUrl;
     Name                   = name;
     MaxTries               = maxTries;
     TemplateElements       = templateElements;
     PasswordCreationPolicy = passwordCreationPolicy;
 }
Beispiel #3
0
 public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "ExpectedSiteToLoad")
         {
             ExpectedSiteToLoad = (StringOrRegex)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 1)
     {
         NewInstance();
     }
 }
 public new void ReadAvailableInputParameters()
 {
     foreach (var inputParameter in InputParameterAvailable)
     {
         if (inputParameter.Key == "ExpectedResourceUrl")
         {
             ExpectedResourceUrl = (StringOrRegex)inputParameter.Value;
         }
         else if (inputParameter.Key == "ExpectedFrameName")
         {
             ExpectedFrameName = (StringOrRegex)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 2)
     {
         NewInstance();
     }
 }
Beispiel #5
0
        public StringOrRegex TranslatePlaceholderStringOrRegexToSingleStringOrRegex(StringOrRegex value)
        {
            if (value == null)
            {
                return(null);
            }

            List <string> placeHolderList = ExtractAllPlaceholdersFromString(value.Value.Value);

            for (int i = 0; i < placeHolderList.Count; i++)
            {
                foreach (var keyValuePair in OverloadData)
                {
                    if (keyValuePair.Key == placeHolderList[i])
                    {
                        value.Value.Value = value.Value.Value.Replace(placeHolderList[i], keyValuePair.Value);
                    }
                }
            }
            return(value);
        }
 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;
         }
         else if (inputParameter.Key == "ExpectedValue")
         {
             ExpectedValue = (StringOrRegex)inputParameter.Value;
         }
     }
     if (InputParameterAvailable.Count != 3)
     {
         NewInstance();
     }
 }
 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;
         }
     }
     if (InputParameterAvailable.Count != 3)
     {
         NewInstance();
     }
 }