import { OjMessageBase } from './OjMessageBase';

/**
 * The component WebElement for [oj-message](../../jsdocs/oj.ojMessage.html).
 * Do not instantiate this class directly, instead, use
 * [ojMessage](../functions/elements.ojMessage-1.html).
 */
export class OjMessage extends OjMessageBase {
  /**
   * Dismiss the message
   */
  async doClose() {
    await this.whenReady();
    await this.getDriver().executeScript('arguments[0].close()', this);
    await this.whenBusyContextReady();
  }
}
