accessibilityRegion method

Class: CheckSettingsPlatform: NightwatchLanguage: JavaScript SDK:

Use to define an accessibility region and its type.

Syntax

eyes.check(Target.window().accessibilityRegion(region_obj1));

eyes.check(Target.window().accessibilityRegion(region_obj2, type));

eyes.check(Target.window().accessibilityRegion(region_obj2));

eyes.check(Target.window().accessibilityRegion(region_ele, type));

eyes.check(Target.window().accessibilityRegion(region_ele));

eyes.check(Target.window().accessibilityRegion(region_sel, type));

eyes.check(Target.window().accessibilityRegion(region_sel));

Parameters

region_obj1
Type:
{
  region: RegionPlain | Element | Selector;
  type?:
    | AccessibilityRegionType
    | "BoldText"
    | "GraphicalObject"
    | "IgnoreContrast"
    | "LargeText"
    | "RegularText";
};
An object that defines a rectangular area in the window.

Type definitions

RegionPlain
Used to describe a position and rectangular region in an image. RegionPlain is defined as: LocationPlain&RectangleSizePlain
Element
Used to identify an HTML element defined as |{ELEMENT:string}|{'element-6066-11e4-a52e-4f735466cecf':string}|import('nightwatch').NightwatchTypedCallbackResult.
Selector
Used to identify an HTML element defined as |{locateStrategy:import('nightwatch').LocateStrategy;selector:'string'}|string|{selector:string;type:string}.
region_obj2
Type:RegionPlain
An object that defines a rectangular area in the window.

Type definitions

RegionPlain
Used to describe a position and rectangular region in an image. RegionPlain is defined as: LocationPlain&RectangleSizePlain
type
Type:AccessibilityRegionType [Optional ]
The accessibility type of the region.
region_ele
Type:Element
An element whose position and bounding rectangle defines the region.

Type definitions

Element
Used to identify an HTML element defined as |{ELEMENT:string}|{'element-6066-11e4-a52e-4f735466cecf':string}|import('nightwatch').NightwatchTypedCallbackResult.
region_sel
Type:Selector
A selector to an element whose position and bounding rectangle defines the region.

Type definitions

Selector
Used to identify an HTML element defined as |{locateStrategy:import('nightwatch').LocateStrategy;selector:'string'}|string|{selector:string;type:string}.

Return value

Type: CheckSettings

Remarks

For more information about the Contrast advisor feature see Contrast advisor.