Get element coordinates Version 21 (.Net)
Action group: Windows
Description
The action gets element center coordinates.
Action icon
Settings of parameters
Свойство | Описание | Тип | Пример заполнения | Обязательность заполнения поля |
Параметры | ||||
Элемент | Ресурс который хранит данные о выбранном элементе приложения | Robin.WinElement | Да | |
Тайм-аут | Время в миллисекундах, в течении которого будет происходить поиск нужного окна. | Robin.Numeric | Нет | |
Номер окна | Если найдено несколько окон, то действие взаимодействует с окном под указанным номером | Robin.Numeric | Нет | |
Результаты | ||||
Левый верхний угол элемента | Координаты левого верхнего угла элемента. | Robin.LocationPo int | ||
Центр элемента | Координаты центра элемента. | Robin.LocationPo int | ||
Правый нижний угол элемента | Координаты правого нижнего угла элемента. | Robin.LocationPo int |
Special conditions of use
Preliminary activation of the window containing the item is needed.
The group does not work with the taskbar, explorer, and workspace.
Example of use
Task
There is an open parameters window, get search field element coordinates.
Solution
Use the "Get element coordinates" action.
Implementation
- Move the "Get element coordinates" action to the workspace.
- Set the "Get element coordinates" action parameters. Get the element with the WinSpy tool. Working with WinSpy is described in section Get Win-element
Setting a timeout does not, in general, increase the execution time of an action beyond the time it takes for the item we are using in the action to become visible and accessible. During the set timeout, the action tries to access the element it is working with. As soon as the item is available, the waiting timeout expires. - Click "Start" in the top panel.
Result
The program robot completed successfully.
Element coordinates were obtained.
Обзор
Инструменты контента