次の方法で共有


PlaybackSettings.DelayBetweenActions プロパティ

アクション間の遅延時間をミリ秒単位で取得または設定します。

名前空間:  Microsoft.VisualStudio.TestTools.UITesting
アセンブリ:  Microsoft.VisualStudio.TestTools.UITesting (Microsoft.VisualStudio.TestTools.UITesting.dll 内)

構文

'宣言
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)

プロパティ値

型: System.Int32
アクション間の遅延時間 (ミリ秒単位)。

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));
        }

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

PlaybackSettings クラス

Microsoft.VisualStudio.TestTools.UITesting 名前空間