diff --git a/src/pages/commonPage.ts b/src/pages/commonPage.ts index bd6d573..a7d6b4d 100644 --- a/src/pages/commonPage.ts +++ b/src/pages/commonPage.ts @@ -135,6 +135,7 @@ export default class CommonPage implements CommonPageInterface { * @param selector{string} From where to get text * @param waitForSelector {boolean} True to wait for selector to be visible before getting text * @param withTrim {boolean} True to trim the text + * @param timeout {number} Time to wait on milliseconds before throwing an error * @return {Promise} */ async getTextContent( @@ -142,9 +143,10 @@ export default class CommonPage implements CommonPageInterface { selector: string, waitForSelector: boolean = true, withTrim: boolean = true, + timeout: number = 10000, ): Promise { if (waitForSelector) { - await this.waitForVisibleSelector(page, selector); + await this.waitForVisibleSelector(page, selector, timeout); } const textContent = await page.locator(selector).first().textContent(); diff --git a/src/versions/develop/pages/BO/modules/moduleManager/index.ts b/src/versions/develop/pages/BO/modules/moduleManager/index.ts index d3612c1..315d67d 100644 --- a/src/versions/develop/pages/BO/modules/moduleManager/index.ts +++ b/src/versions/develop/pages/BO/modules/moduleManager/index.ts @@ -231,7 +231,7 @@ class ModuleManagerPage extends BOBasePage implements ModuleManagerPageInterface await this.uploadOnFileChooser(page, this.uploadModuleLink, [file]); - return this.getTextContent(page, this.uploadModuleModalSuccessMessage); + return this.getTextContent(page, this.uploadModuleModalSuccessMessage, true, true, 30000); } /** @@ -492,7 +492,7 @@ class ModuleManagerPage extends BOBasePage implements ModuleManagerPageInterface } } - return this.getGrowlMessageContent(page); + return this.getGrowlMessageContent(page, 300000); } /**