Skip to content

Latest commit

 

History

History
337 lines (191 loc) · 8.16 KB

collection.md

File metadata and controls

337 lines (191 loc) · 8.16 KB

selenidejsCollection

Class: Collection

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ 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

Properties

configuration

configuration: Configuration

Inherited from Entity.configuration

Defined in lib/entity.ts:52


Private locator

locator: Locator‹Promise‹WebElement[]››

Defined in lib/collection.ts:32


Protected wait

wait: Wait‹this›

Inherited from Entity.wait

Defined in lib/entity.ts:53

Accessors

first

get first(): Element

Defined in lib/collection.ts:55

Returns: Element

Methods

collected

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

elementAt(index: number): Element

Defined in lib/collection.ts:51

Parameters:

Name Type
index number

Returns: Element


elementBy

elementBy(...conditions: ElementCondition[]): Element

Defined in lib/collection.ts:75

Parameters:

Name Type
...conditions ElementCondition[]

Returns: Element


filteredBy

filteredBy(...conditions: ElementCondition[]): Collection

Defined in lib/collection.ts:68

Parameters:

Name Type
...conditions ElementCondition[]

Returns: Collection


get

get<R>(query: Lambda‹this, R›): Promise‹R›

Inherited from Entity.get

Defined in lib/entity.ts:103

Type parameters:

R

Parameters:

Name Type
query Lambda‹this, R›

Returns: Promise‹R›


getAsCashedArray

getAsCashedArray(): Promise‹Element[]›

Defined in lib/collection.ts:44

Returns: Promise‹Element[]›


getWebElements

getWebElements(): Promise‹WebElement[]›

Defined in lib/collection.ts:86

Returns: Promise‹WebElement[]›


matching

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

perform(command: Lambda‹this, void›): Promise‹this›

Inherited from Entity.perform

Defined in lib/entity.ts:94

Parameters:

Name Type
command Lambda‹this, void›

Returns: Promise‹this›


should

should(...conditions: Condition‹this›[]): Promise‹this›

Inherited from Entity.should

Defined in lib/entity.ts:77

Parameters:

Name Type
...conditions Condition‹this›[]

Returns: Promise‹this›


sliced

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

toString(): string

Defined in lib/collection.ts:90

Returns: string


waitUntil

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

with(customConfig: Partial‹Configuration›): Collection

Defined in lib/collection.ts:39

Parameters:

Name Type
customConfig Partial‹Configuration

Returns: Collection