ElementNotAvailableException class

Applies to Windows and Windows Phone

The exception that is thrown when an attempt is made to access a Microsoft UI Automation element corresponding to a part of the user interface that is no longer available.

Syntax

Public Class ElementNotAvailableException
    Inherits Exception

Members

The ElementNotAvailableException class has these types of members:

Constructors

The ElementNotAvailableException class has these constructors.

ConstructorDescription
ElementNotAvailableException() Initializes a new instance of the ElementNotAvailableException class.
ElementNotAvailableException(String) Initializes a new instance of the ElementNotAvailableException class with a specified error message.
ElementNotAvailableException(String,Exception) Initializes a new instance of the ElementNotAvailableException class with a specified error message and a reference to the inner exception that is the cause of this exception.

 

Events

The ElementNotAvailableException class has these events.

EventDescription
SerializeObjectState (Inherited from Exception)

 

Methods

The ElementNotAvailableException class has these methods. It also inherits methods from the Object class.

MethodDescription
GetBaseException (Inherited from Exception)
GetObjectData (Inherited from Exception)
GetType (Inherited from Exception)
ToString (Inherited from Exception)

 

Properties

The ElementNotAvailableException class has these properties.

PropertyAccess typeDescription

Data

Read-only (Inherited from Exception)

HelpLink

Read/write (Inherited from Exception)

HResult

Read-only (Inherited from Exception)

InnerException

Read-only (Inherited from Exception)

Message

Read-only (Inherited from Exception)

Source

Read/write (Inherited from Exception)

StackTrace

Read-only (Inherited from Exception)

TargetSite

Read-only (Inherited from Exception)

 

Remarks

This exception can be thrown if the element was in a dialog box that was closed, or in an app that was closed or terminated.

Clients can get this exception if they call the managed AutomationElement.GetCurrentPropertyValue or similar APIs, but the UI element that the automation element refers to has been deleted or is otherwise no longer in memory.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Automation

Assembly

System.Runtime.WindowsRuntime.UI.Xaml.dll

See also

Custom automation peers

 

 

Show:
© 2014 Microsoft