Skip to content

Instantly share code, notes, and snippets.

@chinhodado
Created June 26, 2015 15:03
Show Gist options
  • Save chinhodado/8e83972b7af844f63fca to your computer and use it in GitHub Desktop.
Save chinhodado/8e83972b7af844f63fca to your computer and use it in GitHub Desktop.
CodedUI PlaybackSettings default values
internal void ApplySettings(IDictionary<string, string> appSettings)
{
this.DelayBetweenSendKeys = PlaybackSettings.GetConfigOptionValueInt("DelayBetweenSendKeys", 10, appSettings);
this.DelayBetweenActions = PlaybackSettings.GetConfigOptionValueInt("DelayBetweenActions", 100, appSettings);
this.SearchTimeout = PlaybackSettings.GetConfigOptionValueInt("SearchTimeout", 120000, appSettings);
this.SearchInMinimizedWindows = PlaybackSettings.GetConfigOptionValue<bool>("SearchInMinimizedWindows", true, appSettings);
this.MatchExactHierarchy = PlaybackSettings.GetConfigOptionValue<bool>("MatchExactHierarchy", false, appSettings);
this.SmartMatchOptions = PlaybackSettings.GetSmartMatchOptions(appSettings);
this.ThinkTimeMultiplier = PlaybackSettings.GetConfigOptionValueDouble("ThinktimeMultiplier", 1.0, appSettings);
this.WaitForReadyTimeout = PlaybackSettings.GetConfigOptionValueInt("WaitForReadyTimeout", 60000, appSettings);
this.MaximumRetryCount = PlaybackSettings.GetConfigOptionValueInt("MaximumPermissibleRetryAttempts", 1, appSettings);
this.NavigationTimeout = -1;
PlaybackSettings.AddLocaleIdentifiers(this, UITestUtilities.GetLocaleIdentifiers(appSettings));
this.WaitForReadyEnabled = true;
this.AutoRefetchEnabled = true;
this.AlwaysSearchControls = false;
this.TopLevelWindowSinglePassSearch = false;
this.UpdateTitleInWindowSearch = true;
this.HoverDuration = 300;
this.MouseMoveSpeed = 450;
this.MouseDragSpeed = 500;
this.SetEncryptionKeyLocation(PlaybackSettings.GetConfigOptionValue<string>("EncryptionKeyLocation", string.Empty, appSettings), PlaybackSettings.GetConfigOptionValueInt("EncryptionKeyLength", 16, appSettings));
this.ContinueOnError = false;
this.WaitForReadyLevel = WaitForReadyLevel.UIThreadOnly;
ALUtility.InitializeBrowserWindow();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment