AutomationElementMode 열거형

정의

UI 자동화 요소를 반환할 때 사용할 참조 형식을 지정하는 값을 포함합니다. 이러한 값은 AutomationElementMode 속성에 사용됩니다.

public enum class AutomationElementMode
public enum AutomationElementMode
type AutomationElementMode = 
Public Enum AutomationElementMode
상속
AutomationElementMode

필드

Name Description
None 0

반환된 요소에 기본 UI에 대한 참조가 없고 캐시된 정보만 포함하도록 지정합니다. 예를 들어 이 모드를 사용하여 항목 자체에 대한 참조를 가져오지 않고 목록 상자에서 항목의 이름을 검색할 수 있습니다.

Full 1

반환된 요소에 기본 UI에 대한 전체 참조가 있음을 지정합니다.

예제

다음 예제에서는 모드를 설정하는 CacheRequest방법을 보여줍니다.

// Set up the request.
CacheRequest cacheRequest = new CacheRequest();

// Do not get a full reference to the cached objects, only to their cached properties and patterns.
cacheRequest.AutomationElementMode = AutomationElementMode.None;
' Set up the request.
Dim cacheRequest As New CacheRequest()

' Do not get a full reference to the cached objects, only to their cached properties and patterns.
cacheRequest.AutomationElementMode = AutomationElementMode.None

설명

Full은 기본값이며 반환된 요소에 기본 UI(사용자 인터페이스)에 대한 전체 참조가 포함되도록 지정합니다. 없음은 반환된 요소에 기본 UI에 대한 참조가 없고 캐시된 정보만 포함하도록 지정하지 않습니다.

요소에 대한 특정 작업(예: GetCurrentPropertyValue 전체 SetFocus참조)이 필요하며, 아무 결과도 없는 요소에서 InvalidOperationException이러한 작업을 수행하려고 합니다.

전체 참조 설정과 관련된 오버헤드를 방지하므로 속성만 필요한 경우 None을 사용하는 것이 더 효율적일 수 있습니다.

적용 대상

추가 정보