Partager via


PlaybackSettings.DelayBetweenActions, propriété

Obtient ou définit le délai entre des actions en millisecondes.

Espace de noms :  Microsoft.VisualStudio.TestTools.UITesting
Assembly :  Microsoft.VisualStudio.TestTools.UITesting (dans Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntaxe

'Déclaration
Public Property DelayBetweenActions As Integer
    Get
    Set
public int DelayBetweenActions { get; set; }
public:
property int DelayBetweenActions {
    int get ();
    void set (int value);
}
member DelayBetweenActions : int with get, set
function get DelayBetweenActions () : int
function set DelayBetweenActions (value : int)

Valeur de propriété

Type : System.Int32
Délai entre des actions en millisecondes.

Exemples

public void ModifiedSimpleAppTest()
        {
            #region Variable Declarations
            WpfButton uIStartButton = this.UIMainWindowWindow.UIStartButton;
            WpfCheckBox uICheckBoxCheckBox = this.UIMainWindowWindow.UICheckBoxCheckBox;
            WpfButton uICloseButton = this.UIMainWindowWindow.UIMainWindowTitleBar.UICloseButton;
            #endregion

            // Launch '%VisualStudioDir%\Projects\AddTwoNumbers\AddTwoNumbers\bin\Debug\AddTwoNumbers.exe'
            ApplicationUnderTest uIMainWindowWindow = ApplicationUnderTest.Launch(this.SimpleAppTestParams.UIMainWindowWindowExePath, this.SimpleAppTestParams.UIMainWindowWindowAlternateExePath);

            // Set delay between actions to 1 second. Add this code before any mouse, keyboard and SetProperty actions.
            Playback.PlaybackSettings.DelayBetweenActions = 1000;

            // Click 'Start' button
            Mouse.Click(uIStartButton, new Point(27, 10));

            uICheckBoxCheckBox.WaitForControlEnabled();
            
            // Select 'CheckBox' check box
            uICheckBoxCheckBox.Checked = this.SimpleAppTestParams.UICheckBoxCheckBoxChecked;

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(15, 10));
        }

Sécurité .NET Framework

Voir aussi

Référence

PlaybackSettings Classe

Microsoft.VisualStudio.TestTools.UITesting, espace de noms