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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ElementA resource that stores data about the selected application element.Robin.WinElement
Yes
Time-out, msThe time in milliseconds for which the desired element will be searched.Robin.Numeric
No
Window orderThe 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 

  1. The specified element may be outside the visible part of the window.
  2. 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

  1.  Assemble a robot scheme with the actions:

  2. Set the "Run" action parameters.  

  3. 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.
  4. 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.

 

  • Нет меток