accessibilityRegions method

Class: CheckSettingsPlatform: ProtractorLanguage: JavaScript SDK:

Define multiple accessibility regions and their types.

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

Syntax

eyes.check(Target.window().accessibilityRegions(regions_arr1));

eyes.check(Target.window().accessibilityRegions(type, regions_arr2));

Parameters

regions_arr1
Type:
(
  | {
      region: RegionPlain | Element | Selector;
      type?: AccessibilityRegionType | undefined;
    }
  | RegionPlain
  | Element
  | Selector
)[];
An array of literal objects that specify the accessibility regionions to be analyzed, and their accessibility types.

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 import('selenium-webdriver').WebElement|import('protractor').ElementFinder.
Selector
Used to identify an HTML element defined as |import('protractor').Locator|{using:string;value:string}|string|{selector:string;type:string}.
type
Type:AccessibilityRegionType
The accessibility type of the region to apply to all of the regions.
regions_arr2
Type:
(RegionPlain|Element|Selector)[]
One or more objects that define accessibility regions to be analyzed. The regions can be defined in various ways depending on the type passed.

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 import('selenium-webdriver').WebElement|import('protractor').ElementFinder.
Selector
Used to identify an HTML element defined as |import('protractor').Locator|{using:string;value:string}|string|{selector:string;type:string}.

Return value

Type: CheckSettings