Skip to main content
Version: 0.20.3

and

production

Logic and operator

Examples:

example scene: 
--------------- ----------------
| icon user | | icon search |
--------------- ----------------
const icons = await aui.get().icon().exec();
console.log(icons);

Using only the element-description icon, the get will return both icons

console output: [
DetectedElement {
name: 'ICON',
text: 'user',
bndbox: BoundingBox {
xmin: 1000,
ymin: 1010,
xmax: 1020,
ymax: 1030
}
},
DetectedElement {
name: 'ICON',
text: 'search',
bndbox: BoundingBox {
xmin: 900,
ymin: 910,
xmax: 920,
ymax: 930
}
}
]

You can combine element-descriptions with the and() relation and specify exactly which icon you want.

const icons = await aui.get().icon().and().withText('user').exec()
console.log(icons)

The get returns only the user icon although both elements are icons.

 console output: [
DetectedElement {
name: 'ICON',
text: 'user',
bndbox: BoundingBox {
xmin: 900,
ymin: 910,
xmax: 920,
ymax: 930
}
}
]