GenericScroller

Description

Generic implementation for a scroller that implements the IScroller interface. This generic implementation is based on a scroller with up- and down arrows that are not hidden automatically and a thumb that moves when scrolling as it is typically found in many Windows applications. It will not work for a macOS scroller which does not feature the up- and down arrows.

The scroller requires the user to provide images for the specific scroller of the target application. When taking the images the following points not to be observed to allow the implementation to work correctly:

Up- and DownArrow images: The image needs to be taken or cropped so that the lower (for UpArrow) or upper (for DownArrow) is exactly at the border between the button and the scrollbar area. This is important as for scrolling a page up or down, the implementation clicks just slightly above or below the button. A simple way to capture these images is by hovering over the button, so the borders of the button are clearly visible then switching to capture mode and crop the image selection to now visible borders. For some scrollers there are active and inactive button representations to indicate if the scroller is active. This representations need to be both captured and named (or placed in folders named) active and inactive, similar to how it is done for Button. Make sure the engine can distinguish the representations by setting the precision and/or engine in the image explorer.

AtBottom and AtTop images: These images should show the thumb at the very bottom and very top of the scrollbar, ideally the images also include the Up- and DownArrows. Make sure these images are less wide than the images of the Up- and DownArrows as the width of the Select to search for AtBottom and AtTop is determined by the Up- and DownArrow images. If the thumb has a hover effect, you might need to provide two representations of AtBottom and AtTop images or make sure that the image can be found with or without hover effect.

GenericScroller Class

Namespace: Progile.TRIO.BaseModel Assembly: Progile.TRIO.BaseModel (in Progile.TRIO.BaseModel.dll)

Inheritance Hierarchy:

Object Progile.TRIO.BaseModel.OnScreenElement

Constructors

Creates a new instance of the GenericScroller, based on the provided images. See above for details about the different images.

Syntax:

public GenericScroller(
	ITester tester,
	Select searchRectangle,
	ImageReference upArrowButtonImage,
	ImageReference downArrowButtonImage,
	ImageReference atTopImage,
	ImageReference atBottomImage,
  ImageReference inactiveUpArrowButtonImage = null,
  ImageReference inactiveDownArrowButtonImage = null
)

Methods

Properties

Last updated