UNPKG

@vibe/testkit

Version:
105 lines 3.52 kB
import { Locator, Page } from "@playwright/test"; import { BaseElement } from "./BaseElement"; import { Button } from "./Button"; /** * Class representing a Steps element. * Extends the BaseElement class. */ export declare class Steps extends BaseElement { private backButton; private forwardButton; /** * Create a Steps element. * @param {Page} page - The Playwright page object. * @param {Locator} locator - The locator for the Steps element. * @param {string} elementReportName - The name for reporting purposes. */ constructor(page: Page, locator: Locator, elementReportName: string); /** * Get a step by its index. * @param {number} index - The index of the step to retrieve. * @returns {Promise<Button>} The step with the specified index. */ getStepByIndex(index: number): Promise<Button>; /** * Get all step dots. * @returns {Promise<Button[]>} An array of step dots. */ getStepDots(): Promise<Button[]>; /** * Go to the previous step. */ goToPreviousStep(): Promise<void>; /** * Go to the next step. */ goToNextStep(): Promise<void>; /** * Check if the back button is enabled. * @returns {Promise<boolean>} True if the back button is enabled, false otherwise. */ isBackButtonEnabled(): Promise<boolean>; /** * Check if the forward button is enabled. * @returns {Promise<boolean>} True if the forward button is enabled, false otherwise. */ isForwardButtonEnabled(): Promise<boolean>; /** * Check if the back button is visible. * @returns {Promise<boolean>} True if the back button is visible, false otherwise. */ isBackButtonVisible(): Promise<boolean>; /** * Check if the forward button is visible. * @returns {Promise<boolean>} True if the forward button is visible, false otherwise. */ isForwardButtonVisible(): Promise<boolean>; /** * Get the number of steps. * @returns {Promise<number>} The number of steps. */ getTotalStepsCount(): Promise<number>; /** * Click a step dot by its index. * @param {number} stepIndex - The index of the step dot to click. * @returns {Promise<void>} */ clickStepDot(stepIndex: number): Promise<void>; /** * Get the active step dot index. * @returns {Promise<number>} The active step dot index. */ getActiveStepDotIndex(): Promise<number>; /** * Check if a step dot is active. * @param {number} stepIndex - The index of the step dot to check. * @returns {Promise<boolean>} True if the step dot is active. */ isStepDotActive(stepIndex: number): Promise<boolean>; /** * Navigate to the first step. * @returns {Promise<void>} */ navigateToBeginning(): Promise<void>; /** * Navigate to the last step. * @returns {Promise<void>} */ navigateToEnd(): Promise<void>; /** * Get the current step content. * @returns {Promise<BaseElement>} The current step content. */ getCurrentStepContent(): Promise<BaseElement>; /** * Get the current step index from the steps numbers header (for numbers type steps). * @returns {Promise<number>} The current step index (0-based). */ getCurrentStepIndex(): Promise<number>; /** * Wait for the steps to load. * @returns {Promise<void>} */ waitForStepsToLoad(): Promise<void>; } //# sourceMappingURL=Steps.d.ts.map