-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobalPagesSetup.js
45 lines (34 loc) · 1.19 KB
/
globalPagesSetup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { StartApplicationPage } from "./pages/StartApplicationPage.js";
import { ReviewPaymentPage } from "./pages/ReviewPaymentPage.js";
import { PaymentPlanPage } from "./pages/PaymentPlanPage.js";
// Import OTHER PAGES CLASSES HERE...
/**
* @type {import('./pages/StartApplicationPage.js').StartApplicationPage}
*/
export let startApplicationPage;
/**
* @type {import('playwright').Page}
*/
export let page;
/**
* @type {import('./pages/ReviewPaymentPage.js').ReviewPaymentPage}
*/
export let reviewPaymentPage;
/**
* @type {import('./pages/PaymentPlanPage.js').PaymentPlanPage}
*/
export let paymentPlanPage;
// ADD OTHER PAGE CLASS REFERENCES HERE...
/**
* Initializes the global page elements and instances for the automation framework.
*
* @param {import('playwright').Page} argPage - The Playwright Page instance to be used for interacting with the web pages.
* @returns {void} This function does not return any value.
*/
export const initElements = (argPage) => {
page = argPage;
startApplicationPage = new StartApplicationPage(page);
reviewPaymentPage = new ReviewPaymentPage(page);
paymentPlanPage = new PaymentPlanPage(page);
// INITIALIZE PAGE INSTANCES HERE...
};