Find Multiple UI Elements (ui_element.find_all)
This function is available in versions after 20260507
Declaration
elements = ui_element.find_all(selector [, options ])
Parameters
- selector Table. Describes the target UI elements. See Selector fields.
- options Optional, table. See Common options.
Returns
- elements Table. Array of all matched elements. Returns an empty array when no element matches.
Description
find_allis useful for enumerating controls of the same type or checking match count first. If you only need the first match, usefind.
Example
local ui_element = require("ui_element")
local items = ui_element.find_all({
role = "button",
})
for i, item in ipairs(items) do
nLog(i, item.text or "")
end
Note: Uses non-chapter API nLog.