import { OjDialogBase } from './OjDialogBase';

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