Skip to main content

Class: NativeCarousel

Defined in: packages/core/src/helpers/native/carousel.ts:14

Constructors​

Constructor​

new NativeCarousel(opts): Carousel;

Defined in: packages/core/src/helpers/native/carousel.ts:22

Parameters​

opts​

CarouselOptions

Returns​

Carousel

Properties​

cardSelector​

cardSelector: Selector;

Defined in: packages/core/src/helpers/native/carousel.ts:17


carouselRectangles?​

optional carouselRectangles?: ScreenRect;

Defined in: packages/core/src/helpers/native/carousel.ts:20

memoised result of Carousel.getCarouselRectangles


carouselSelector​

carouselSelector: Selector;

Defined in: packages/core/src/helpers/native/carousel.ts:15

Methods​

getCardText()​

getCardText(nthCard): Promise<string>;

Defined in: packages/core/src/helpers/native/carousel.ts:53

Return de carousel text Carousel only has a max of 3 elements when 3 or more cards are provided When the first or last card is active then 2 elements are present

if first card is active the first of 2 elements is the active card else if last card is active the last of 2 elements is the active card else there are 3 elements and the active card is the middle one

nthCard: use 'first' to indicate the first card, else use a different word to indicate the other card, e.g. 'active'.

Parameters​

nthCard​

string

Returns​

Promise<string>


getCarouselRectangles()​

getCarouselRectangles(): Promise<ScreenRect>;

Defined in: packages/core/src/helpers/native/carousel.ts:142

Get the carousel position and size

Returns​

Promise<ScreenRect>


swipeLeft()​

swipeLeft(): Promise<void>;

Defined in: packages/core/src/helpers/native/carousel.ts:95

Swipe the carousel to the LEFT (from right to left)

Returns​

Promise<void>


swipeRight()​

swipeRight(): Promise<void>;

Defined in: packages/core/src/helpers/native/carousel.ts:119

Swipe the carousel to the RIGHT (from left to right)

Returns​

Promise<void>


waitForIsDisplayed()​

waitForIsDisplayed(reverse?): Promise<void>;

Defined in: packages/core/src/helpers/native/carousel.ts:31

Wait for the carousel to be (un)visible. reverse waits for the selector to not match any elements instead.

Parameters​

reverse?​

boolean = false

Returns​

Promise<void>