-
↳ Collection
- collected
- elementAt
- elementBy
- filteredBy
- get
- getAsCashedArray
- getWebElements
- matching
- perform
- should
- sliced
- toString
- waitUntil
- with
+ new Collection(locator
: Locator‹Promise‹WebElement[]››, configuration
: Configuration): Collection
Overrides Entity.constructor
Defined in lib/collection.ts:32
Parameters:
Name | Type |
---|---|
locator |
Locator‹Promise‹WebElement[]›› |
configuration |
Configuration |
Returns: Collection
• configuration: Configuration
Inherited from Entity.configuration
Defined in lib/entity.ts:52
• locator: Locator‹Promise‹WebElement[]››
Defined in lib/collection.ts:32
• wait: Wait‹this›
Defined in lib/entity.ts:53
• get first(): Element
Defined in lib/collection.ts:55
Returns: Element
▸ collected(searchFunction
: function): Collection
Defined in lib/collection.ts:82
Parameters:
▪ searchFunction: function
▸ (element
: Element): Element | Collection
Parameters:
Name | Type |
---|---|
element |
Element |
Returns: Collection
▸ elementAt(index
: number): Element
Defined in lib/collection.ts:51
Parameters:
Name | Type |
---|---|
index |
number |
Returns: Element
▸ elementBy(...conditions
: ElementCondition[]): Element
Defined in lib/collection.ts:75
Parameters:
Name | Type |
---|---|
...conditions |
ElementCondition[] |
Returns: Element
▸ filteredBy(...conditions
: ElementCondition[]): Collection
Defined in lib/collection.ts:68
Parameters:
Name | Type |
---|---|
...conditions |
ElementCondition[] |
Returns: Collection
▸ get<R>(query
: Lambda‹this, R›): Promise‹R›
Defined in lib/entity.ts:103
Type parameters:
▪ R
Parameters:
Name | Type |
---|---|
query |
Lambda‹this, R› |
Returns: Promise‹R›
▸ getAsCashedArray(): Promise‹Element[]›
Defined in lib/collection.ts:44
Returns: Promise‹Element[]›
▸ getWebElements(): Promise‹WebElement[]›
Defined in lib/collection.ts:86
Returns: Promise‹WebElement[]›
▸ matching(...conditions
: Condition‹this›[]): Promise‹boolean›
Inherited from Entity.matching
Defined in lib/entity.ts:88
Parameters:
Name | Type |
---|---|
...conditions |
Condition‹this›[] |
Returns: Promise‹boolean›
▸ perform(command
: Lambda‹this, void›): Promise‹this›
Defined in lib/entity.ts:94
Parameters:
Name | Type |
---|---|
command |
Lambda‹this, void› |
Returns: Promise‹this›
▸ should(...conditions
: Condition‹this›[]): Promise‹this›
Defined in lib/entity.ts:77
Parameters:
Name | Type |
---|---|
...conditions |
Condition‹this›[] |
Returns: Promise‹this›
▸ sliced(start
: number, end
: number): Collection
Defined in lib/collection.ts:64
Represents a new collection sliced from 'start' element index to 'end' element index exclusive.
Parameters:
Name | Type | Description |
---|---|---|
start |
number | The inclusive "start" index of collection to be sliced. |
end |
number | The exclusive "end" index of collection to be sliced |
Returns: Collection
▸ toString(): string
Defined in lib/collection.ts:90
Returns: string
▸ waitUntil(...conditions
: Condition‹this›[]): Promise‹boolean›
Implementation of Matchable
Inherited from Entity.waitUntil
Defined in lib/entity.ts:84
Parameters:
Name | Type |
---|---|
...conditions |
Condition‹this›[] |
Returns: Promise‹boolean›
▸ with(customConfig
: Partial‹Configuration›): Collection
Defined in lib/collection.ts:39
Parameters:
Name | Type |
---|---|
customConfig |
Partial‹Configuration› |
Returns: Collection