forked from akshayp7/playwright-typescript-playwright-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlertsFrameWindows.test.ts
15 lines (14 loc) · 946 Bytes
/
AlertsFrameWindows.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import test from '@lib/BaseTest';
test(`Verify Alerts, Frame & Windows Page`, { tag: '@Smoke'}, async ({ loginPage, alertsFrameWindowsPage, webActions }) => {
await loginPage.navigateToURL();
await webActions.clickByText('Alerts, Frame & Windows'); // Click on Alerts, Frame & Windows icon
await webActions.clickByText('Browser Windows'); // Click on Browser Windows navigation side bar
await alertsFrameWindowsPage.verifyNewTab(`https://demoqa.com/sample`);
await alertsFrameWindowsPage.verifyNewWindow(`https://demoqa.com/sample`);
await webActions.clickByText('Alerts');
await alertsFrameWindowsPage.enterTextAndAccept(`Hello`); // Enter Text Hello in alert prompt and click ok
await webActions.clickByText('Frames');
await alertsFrameWindowsPage.verifyFrameText('This is a sample page');
await webActions.clickByText('Nested Frames');
await alertsFrameWindowsPage.verifyNestedFrameChildText();
});