From 80d26e0b4b9405ad355d38f4c1681a7278c54273 Mon Sep 17 00:00:00 2001 From: hpathak Date: Mon, 2 Dec 2024 23:37:27 +0530 Subject: [PATCH] minor change Signed-off-by: hpathak --- playwright_test/Pages/certificates.page.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playwright_test/Pages/certificates.page.ts b/playwright_test/Pages/certificates.page.ts index 5814f18..ca829ca 100644 --- a/playwright_test/Pages/certificates.page.ts +++ b/playwright_test/Pages/certificates.page.ts @@ -4,6 +4,7 @@ import yaml from 'js-yaml'; class CertificatesPage{ page: Page; + pageTitle: Locator; click_CertificatePage: Locator; CERTIFICATE_TITLE: Locator; option1: Locator; @@ -118,12 +119,18 @@ class CertificatesPage{ this.previous_step = page.locator('//button[contains(text(),"Previous step")]') this.close_button = page.locator('//button[contains(text(), "Close")]') this.continue_CachingService = page.locator('//button[text()="Continue to Caching Service Setup"]') + this.pageTitle = page.locator("//div[@class='MuiBox-root css-la96ob']/div") } async movetoCertificatePage(){ await this.click_CertificatePage.click({timeout: 5000}) } + async getCertificatesPageTitle() { + await this.page.waitForTimeout(500); + return await this.pageTitle.textContent({ timeout: 2000 }); + } + async returnTitleOfCertiPage(){ const certificate_title = await this.CERTIFICATE_TITLE.textContent(); return certificate_title;