UITestControl.SearchProperties 속성

컨트롤을 식별하는 데 사용되는 속성과 값 쌍 컬렉션을 가져옵니다.

네임스페이스:  Microsoft.VisualStudio.TestTools.UITesting
어셈블리:  Microsoft.VisualStudio.TestTools.UITesting(Microsoft.VisualStudio.TestTools.UITesting.dll)

구문

‘선언
Public ReadOnly Property SearchProperties As PropertyExpressionCollection
    Get
public PropertyExpressionCollection SearchProperties { get; }
public:
property PropertyExpressionCollection^ SearchProperties {
    PropertyExpressionCollection^ get ();
}
member SearchProperties : PropertyExpressionCollection
function get SearchProperties () : PropertyExpressionCollection

속성 값

형식: Microsoft.VisualStudio.TestTools.UITesting.PropertyExpressionCollection
컨트롤을 식별하는 데 사용되는 속성과 값 쌍 컬렉션입니다.

예제

WinButton saveButton = new WinButton(window);
saveButton.SearchProperties.Add(WinProperties.Button.Name, “btnSave”);

Contains 연산자를 사용하려는 경우

WinButton saveButton = new WinButton(window);
//If the name of the button contains “Save”, then it will be found.
saveButton.SearchProperties.Add(WinProperties.Button.Name, “Save”, PropertyExpressionOperator. Contains);

다음과 비슷한 코드가 생성됩니다.

Public WinButton BtnSaveButton
{
   get
   {
      if ((this.mBtnSaveButton == null))
         {
            this.mBtnSaveButton = new WinButton(this);
#region Search Criteria
            this.mBtnSaveButton.SearchProperties[WinProperties.Button.Name] = "btnSave";
#endregion
         }
return this.mBtnSaveButton;
   }
}

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

UITestControl 클래스

Microsoft.VisualStudio.TestTools.UITesting 네임스페이스