IUIAutomationElement7::FindFirstWithOptions 方法 (uiautomationclient.h)

依指定的順序尋找第一個相符的專案。

語法

HRESULT FindFirstWithOptions(
  [in]           TreeScope              scope,
  [in]           IUIAutomationCondition *condition,
                 TreeTraversalOptions   traversalOptions,
  [in, optional] IUIAutomationElement   *root,
  [out, retval]  IUIAutomationElement   **found
);

參數

[in] scope

值的組合,指定搜尋的範圍。

[in] condition

表示要比對之準則之條件的指標。

traversalOptions

指定樹狀目錄導覽順序的列舉值。

[in, optional] root

要開始搜尋之專案的指標。

[out, retval] found

接收專案的指標。 如果找不到相符的專案,則會傳回 NULL

傳回值

如果成功,則傳回 S_OK,否則傳回 HRESULT 錯誤碼。

要求

要求 價值
最低支援的用戶端 Windows 10 版本 1703 [僅限傳統型應用程式]
支援的最低伺服器 Windows Server 2016 [僅限傳統型應用程式]
目標平臺 窗戶
標頭 uiautomationclient.h (include UIAutomation.h)
DLL UIAutomationCore.dll

另請參閱

IUIAutomationElement7