import 'codeceptjs'; import { CommonKeyword } from './commonKeyword'; import { Wait } from './dewWait'; /** * RichEditorTxtBox class */ export class RichEditorTxtBox { /** * To Enter text into Rich Box Editor * * ```js * RichEditorTxtBox.typeToRichEditor("Project_123","Export"); * ``` * * @param {string} editorFrame // Locator for the editorFrame * @param {string} value // Value to enter into Editor */ static async typeToRichEditor(editorFrame:string, value:string) { Wait.waitForElement(editorFrame); CommonKeyword.switchTo(editorFrame); await CommonKeyword.clickElement(`body p`); for (const char of value) { CommonKeyword.pressKey(char); } CommonKeyword.switchTo(); } }