UITestControl.SearchProperties Özellik
Bir denetimi tanımlamakta kullanılan özellik-değer çifti koleksiyonu alır.
Ad alanı: Microsoft.VisualStudio.TestTools.UITesting
Derleme: Microsoft.VisualStudio.TestTools.UITesting (Microsoft.VisualStudio.TestTools.UITesting.dll içinde)
Sözdizimi
'Bildirim
Public ReadOnly Property SearchProperties As PropertyExpressionCollection
public PropertyExpressionCollection SearchProperties { get; }
public:
property PropertyExpressionCollection^ SearchProperties {
PropertyExpressionCollection^ get ();
}
member SearchProperties : PropertyExpressionCollection with get
function get SearchProperties () : PropertyExpressionCollection
Özellik Değeri
Tür: Microsoft.VisualStudio.TestTools.UITesting.PropertyExpressionCollection
Bir denetimi tanımlamakta kullanılan özellik-değer çifti koleksiyonu.
Örnekler
WinButton saveButton = new WinButton(window);
saveButton.SearchProperties.Add(WinProperties.Button.Name, “btnSave”);
Kullanmak istiyorsanız, Contains işleci
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);
Yaratılan kodu şuna benzer:
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 Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.