Ejemplo n.º 1
0
 public override bool SerializationError(SerializationErrorType errorType, string name, string value)
 {
     if (errorType == SerializationErrorType.PropertyNotFound)
     {
         if (name.ToLower().Contains("alm"))
         {
             ALMUserConfig AlmUserConfig = ALMUserConfigs.FirstOrDefault();
             if (AlmUserConfig == null)
             {
                 AlmUserConfig = new ALMUserConfig();
                 ALMUserConfigs.Add(AlmUserConfig);
             }
             if (name == "ALMUserName")
             {
                 AlmUserConfig.ALMUserName = value;
                 return(true);
             }
             if (name == "EncryptedALMPassword")
             {
                 AlmUserConfig.EncryptedALMPassword = value;
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
 public override bool SerializationError(SerializationErrorType errorType, string name, string value)
 {
     if (errorType == SerializationErrorType.PropertyNotFound && (name == Fields.SourceFilePath || name == Fields.DestinationFolder))
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 public override bool SerializationError(SerializationErrorType errorType, string name, string value)
 {
     if (errorType == SerializationErrorType.PropertyNotFound && name == "GotoURLRadioButton")
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
 public override bool SerializationError(SerializationErrorType errorType, string name, string value)
 {
     if (errorType == SerializationErrorType.PropertyNotFound)
     {
         if (name == "SaveResultstoFolderName" || name == "OpenExecutionResultsFolder" || name == "SaveindividualBFReport")
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 5
0
 public override bool SerializationError(SerializationErrorType errorType, string name, string value)
 {
     if (errorType == SerializationErrorType.SetValueException)
     {
         if (name == "MobilePressKey")
         {
             return(true);
         }
         else if (name == nameof(MobileDeviceAction) && value == "Wait")
         {
             return(true);
         }
         else if (name == "MobilePressXY")
         {
             this.MobileDeviceAction = eMobileDeviceAction.PressXY;
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 6
0
        public override bool SerializationError(SerializationErrorType errorType, string name, string value)
        {
            if (errorType == SerializationErrorType.SetValueException)
            {
                if (value == "MobileAppiumAndroid" || value == "PerfectoMobileAndroid" || value == "MobileAppiumIOS" || value == "PerfectoMobileIOS" ||
                    value == "MobileAppiumAndroidBrowser" || value == "PerfectoMobileAndroidWeb" || value == "MobileAppiumIOSBrowser" || value == "PerfectoMobileIOSWeb")
                {
                    this.DriverType          = Agent.eDriverType.Appium;
                    this.DriverConfiguration = new ObservableList <DriverConfigParam>();
                    //this.GetOrCreateParam(nameof(AppiumServer), @"http://127.0.0.1:4723/wd/hub");
                    this.GetOrCreateParam("LoadDeviceWindow", "true");
                    this.GetOrCreateParam("DeviceAutoScreenshotRefreshMode", eAutoScreenshotRefreshMode.Live.ToString());
                    this.DirtyStatus = Amdocs.Ginger.Common.Enums.eDirtyStatus.Modified;

                    if (value == "MobileAppiumAndroid" || value == "PerfectoMobileAndroid")
                    {
                        this.GetOrCreateParam("DevicePlatformType", eDevicePlatformType.Android.ToString());
                        this.GetOrCreateParam("AppType", eAppType.NativeHybride.ToString());
                    }
                    else if (value == "MobileAppiumIOS" || value == "PerfectoMobileIOS")
                    {
                        this.GetOrCreateParam("DevicePlatformType", eDevicePlatformType.iOS.ToString());
                        this.GetOrCreateParam("AppType", eAppType.NativeHybride.ToString());
                    }
                    else if (value == "MobileAppiumAndroidBrowser" || value == "PerfectoMobileAndroidWeb")
                    {
                        this.GetOrCreateParam("DevicePlatformType", eDevicePlatformType.Android.ToString());
                        this.GetOrCreateParam("AppType", eAppType.Web.ToString());
                    }
                    else if (value == "MobileAppiumIOSBrowser" || value == "PerfectoMobileIOSWeb")
                    {
                        this.GetOrCreateParam("DevicePlatformType", eDevicePlatformType.iOS.ToString());
                        this.GetOrCreateParam("AppType", eAppType.Web.ToString());
                    }
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 7
0
 /// <summary>
 // When xml contain field/property which doesn't exist in the object being deserialzed to, then this method will be called
 // Use it when you need to convert old property to new name or type
 // if handled return true
 /// </summary>
 /// <param name="errorType"></param>
 /// <param name="name"></param>
 /// <param name="value"></param>
 public virtual bool SerializationError(SerializationErrorType errorType, string name, string value)
 {
     // override method in sub class need to impelment and return true if handled
     return(false);
 }