Namespace: locatorUtil
@atomic-testing/core.locatorUtil
Interfaces
Variables
defaultOverrideLocatorRelativePositionOption
• Const
defaultOverrideLocatorRelativePositionOption: Readonly
<OverrideLocatorRelativePositionOption
>
Defined in
packages/core/src/utils/locatorUtil.ts:124
Functions
append
▸ append(locatorBase
, ...locatorsToAppend
): PartLocator
Parameters
Name | Type |
---|---|
locatorBase | PartLocator |
...locatorsToAppend | PartLocator [] |
Returns
Defined in
packages/core/src/utils/locatorUtil.ts:17
findRootLocatorIndex
▸ findRootLocatorIndex(locator
): number
Parameters
Name | Type |
---|---|
locator | PartLocator |
Returns
number
Defined in
packages/core/src/utils/locatorUtil.ts:29
getEffectiveLocator
▸ getEffectiveLocator(locator
, interactor
): Promise
<CssLocator
[]>
Parameters
Name | Type |
---|---|
locator | PartLocator |
interactor | Interactor |
Returns
Promise
<CssLocator
[]>
Defined in
packages/core/src/utils/locatorUtil.ts:59
getLinkedCssLocator
▸ getLinkedCssLocator(locator
, context
, interactor
): Promise
<PartLocator
>
Parameters
Name | Type |
---|---|
locator | LinkedCssLocator |
context | PartLocator |
interactor | Interactor |
Returns
Promise
<PartLocator
>
Defined in
packages/core/src/utils/locatorUtil.ts:82
getLinkedCssLocatorMatchingTargetValue
▸ getLinkedCssLocatorMatchingTargetValue(locator
, context
, interactor
): Promise
<Optional
<string
>>
Parameters
Name | Type |
---|---|
locator | LinkedCssLocator |
context | PartLocator |
interactor | Interactor |
Returns
Promise
<Optional
<string
>>
Defined in
packages/core/src/utils/locatorUtil.ts:103
getLocatorInfoForErrorLog
▸ getLocatorInfoForErrorLog(locator
): string
Display a rough description of the locators for error logging this is an estimate, not a precise description with the absence of interactor locators such as LinkedCssLocator would not be interpreted correctly
Parameters
Name | Type |
---|---|
locator | PartLocator |
Returns
string
Defined in
packages/core/src/utils/locatorUtil.ts:167
getLocatorStatement
▸ getLocatorStatement(locator
): string
Parameters
Name | Type |
---|---|
locator | CssLocator |
Returns
string
Defined in
packages/core/src/utils/locatorUtil.ts:116
isChain
▸ isChain(locator
): locator is CssLocatorChain
Parameters
Name | Type |
---|---|
locator | PartLocator |
Returns
locator is CssLocatorChain
Defined in
packages/core/src/utils/locatorUtil.ts:9
overrideLocatorRelativePosition
▸ overrideLocatorRelativePosition(locator
, relative
, option?
): PartLocator
Override the supplied locator's relative position, if the supplied locator is an array of locators, only the first one is overridden
Parameters
Name | Type | Default value |
---|---|---|
locator | PartLocator | undefined |
relative | LocatorRelativePosition | undefined |
option | Partial <Readonly <OverrideLocatorRelativePositionOption >> | defaultOverrideLocatorRelativePositionOption |
Returns
Defined in
packages/core/src/utils/locatorUtil.ts:137
toChain
▸ toChain(locator
): CssLocatorChain
Parameters
Name | Type |
---|---|
locator | PartLocator |
Returns
Defined in
packages/core/src/utils/locatorUtil.ts:13
toCssSelector
▸ toCssSelector(locator
, interactor
): Promise
<string
>
Parameters
Name | Type |
---|---|
locator | PartLocator |
interactor | Interactor |
Returns
Promise
<string
>
Defined in
packages/core/src/utils/locatorUtil.ts:68
toPrimitiveLocators
▸ toPrimitiveLocators(locator
, interactor
): Promise
<CssLocator
[]>
Parameters
Name | Type |
---|---|
locator | PartLocator |
interactor | Interactor |
Returns
Promise
<CssLocator
[]>