import { ElementWithContexMenu } from "../ElementWithContextMenu"; import { AbstractElement } from "../AbstractElement"; import { By, WebElement } from "selenium-webdriver"; /** * Available types of notifications */ export declare enum NotificationType { Info = "info", Warning = "warning", Error = "error", Any = "any" } /** * Abstract element representing a notification */ export declare abstract class Notification extends ElementWithContexMenu { /** * Get the message of the notification * @returns Promise resolving to notification message */ getMessage(): Promise; /** * Get the type of the notification * @returns Promise resolving to NotificationType */ getType(): Promise; /** * Get the source of the notification as text * @returns Promise resolving to notification source */ getSource(): Promise; /** * Find whether the notification has an active progress bar * @returns Promise resolving to true/false */ hasProgress(): Promise; /** * Dismiss the notification * @returns Promise resolving when notification is dismissed */ dismiss(): Promise; /** * Get the action buttons of the notification as an array * of NotificationButton objects * @returns Promise resolving to array of NotificationButton objects */ getActions(): Promise; /** * Click on an action button with the given title * @param title title of the action/button * @returns Promise resolving when the select button is pressed */ takeAction(title: string): Promise; /** * Expand the notification if possible */ expand(): Promise; } /** * Notification displayed on its own in the notifications-toasts container */ export declare class StandaloneNotification extends Notification { constructor(notification: WebElement); } /** * Notification displayed within the notifications center */ export declare class CenterNotification extends Notification { constructor(notification: WebElement); } /** * Notification button */ declare class NotificationButton extends AbstractElement { constructor(buttonConstructor: By, notification: Notification); getTitle(): Promise; } export {};