floatingRegion method
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.window().floatingRegion(regionOrContainer, maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset))
eyes.check(Target.window().floatingRegion(regionOrContainer, maxUpOffset, maxDownOffset, maxLeftOffset))
eyes.check(Target.window().floatingRegion(regionOrContainer, maxUpOffset, maxDownOffset))
eyes.check(Target.window().floatingRegion(regionOrContainer, maxUpOffset))
eyes.check(Target.window().floatingRegion(regionOrContainer))
Parameters
- regionOrContainer
- Type:GetFloatingRegion|Region|FloatingMatchSettings|By|WebElement|EyesWebElement
- An object or locator that defines the floating region location and dimensions.
- maxUpOffset
- Type:number [Optional ]
- The maximum amount that the region can shift upwards and still be considered matching.
- maxDownOffset
- Type:number [Optional ]
- The maximum amount that the region can shift downwards and still be considered matching.
- maxLeftOffset
- Type:number [Optional ]
- The maximum amount that the region can shift to the left and still be considered matching.
- maxRightOffset
- Type:number [Optional ]
- The maximum amount that the region can shift to the right and still be considered matching.
Return value
- Type: SeleniumCheckSettings
- 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.