The information in this topic may be out of date. The current SDK reference guide has moved here.
Strict method
If called without parameters, sets the match level for this target to Strict. Otherwise, defines that a match level of Strict should be used for the regions passed as a parameters.
Syntax
eyes.Check(Target.Window().Strict(selector, selectors))
eyes.Check(Target.Window().Strict(selectors))
eyes.Check(Target.Window().Strict(element, elements))
eyes.Check(Target.Window().Strict(elements))
eyes.Check(Target.Window().Strict(region, regions))
eyes.Check(Target.Window().Strict(regions))
eyes.Check(Target.Window().Strict())
Parameters
- region
- Type:Rectangle
- An object that defines a rectangular area in the window.
- regions
- Type:Rectangle[]
- An array of rectangle objects, each of which defines a region.
- regions
- Type:IEnumerable<Rectangle>
- An array of rectangle objects, each of which defines a region.
- selector
- Type:By
- An object that defines a selector for the region.
- selectors
- Type:By[]
- An array of selector objects that define regions.
- selectors
- Type:IEnumerable<By>
- An array of selector objects that define regions.
- element
- Type:IWebElement
- An element whose position and bounding rectangle defines the region.
- elements
- Type:IWebElement[]
- One or more elements, each of whose bounding rectangle defines a region.
- elements
- Type:IEnumerable<IWebElement>
- One or more elements, each of whose bounding rectangle defines a region.
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 can call this method in two ways - with parameters and without parameters. The meaning of the method, and the way it can be used is different in each case. When the method is called without parameters it sets the default match level for this target. When called with one or more regions as parameters it defines the match level for that region. The sections below provide some more details regarding how to use this method in each of these modes.
Called without parameters
If this method is called without parameters then it sets the default match level for this target. This overrides the hard-coded default and the default match level defined by using
eyes$setmatchlevel
.
Called with parameters
When the method is called with one or more parameters that define one or more regions, then these set the match level for those regions, overiding the defaults set for the target (by calling these methods without a parameter), set by
eyes$setmatchlevel
and the hardcoded default match level.
You may define multiple regions that have an explicit match level by calling this method multiple times in a chain, or by passing the method multiple regions.
The region matchlevel methods
checksettings$strict(regions)
,
checksettings$layout(regions)
.,
checksettings$content(regions)
.
checksettings$strictregions(regions)
,
checksettings$layoutregions(regions)
.,
checksettings$contentregions(regions)
should not overlap each other or the regions defined using
checksettings$ignoreregion(regions)
.
checksettings$ignoreregions(regions)
.
If they overlap each other, or regions that defined using the Test Manager then the results is undefined.
For a full description of the affect of each match levels and the different ways to apply them to tests, checkpoints and regions, How to use Eyes match levels.