Scroll to element Version 2 (Net)
Action group: Windows Subgroup: Interaction with Win-elements
Description
The action determines the coordinates of the specified element in the window and scrolls to this element until it is as close as possible to the center of the screen
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Element | A resource that stores data about the selected application element. | Robin.WinElement | Yes | |
Time-out, ms | The time in milliseconds for which the desired element will be searched. | Robin.Numeric | No | |
Window order | The sequence number of the window that the action should work with. If you do not specify a window number, the first window will be checked. The numbering starts from 1. | Robin.Numeric | No |
Special conditions of use
- The specified element may be outside the visible part of the window.
- If the item is already close to the center of the screen, the action does not change anything, the robot does not generate an error.
Example of use
Task
Open an Excel window, find the needed template:
Solution
Use the "Scroll to element" action.
Implementation
- Assemble a robot scheme with the actions:
- Set the "Run" action parameters.
- Set the parameters of the "Scroll to element" action. The element must be obtained using the WinSpy tool. Working with WinSpy is described in the Получение win-элемента section. Setting a timeout does not, in general, increase the execution time of an action beyond the time it takes for the item used 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.
Starting position:
The "Scroll to element" action found the desired Win-element and scrolled to it.
Обзор
Инструменты контента