floating method

Class: TargetPlatform: Selenium 3Language: JavaScript SDK:

Add one more floating region to this target.

When you define a floating region, you define an inner region and offsets outwards from the inner region in all directions to form an outer region. All the pixels of the outer region will be considered as matched if the pixels of the checkpoint inner region match at least one area in the baseline outer region.

Syntax


eyes.check(Target.floating(floatingRegion))

Parameters

floatingRegion
Type:FloatingRegion|FloatingElement
A comma-separated list of FloatingRegion objects or FloatingElement objects. A FloatingRegion is an object defined as follows:

{left: number, top: number, width: number, height: number,
maxLeftOffset: number, maxRightOffset: number, maxUpOffset: number, maxDownOffset: number}
A FloatingElement is an object defined as follows:

{element: webdriver.WebElement|EyesRemoteWebElement|webdriver.By,
maxLeftOffset: number, maxRightOffset: number, maxUpOffset: number, maxDownOffset: number}

Return value

Type: Target
The value returned is the object that called the method. You can use it to call other methods supported by the object class.

Remarks

You may call this method multiple times in a given chain; each call defines a different floating region. Floating regions may not overlap each other or other types of regions, such as ignore or match level regions. Create regions using the GeometryUtils.js in eyes.utils.