You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BaseDialog.ts 583B

1234567891011121314151617181920212223
  1. import BasePageObject from './BasePageObject';
  2. const CLOSE_BUTTON = 'modal-header-close-button';
  3. const OK_BUTTON = 'modal-dialog-ok-button';
  4. /**
  5. * Base class for all dialogs.
  6. */
  7. export default class BaseDialog extends BasePageObject {
  8. /**
  9. * Clicks on the X (close) button.
  10. */
  11. async clickCloseButton(): Promise<void> {
  12. await this.participant.driver.$(`#${CLOSE_BUTTON}`).click();
  13. }
  14. /**
  15. * Clicks on the ok button.
  16. */
  17. async clickOkButton(): Promise<void> {
  18. await this.participant.driver.$(`#${OK_BUTTON}`).click();
  19. }
  20. }