File: pages/LoginPage.ts
Encapsulates all selectors and actions for the login page.
Provides a single place to maintain login logic, making tests more readable and maintainable.
goto(): Navigates to the login page URL.login(userName: string, password: string): Fills in the username and password fields and clicks the login button.
const loginPage = new LoginPage(page);
await loginPage.goto();
await loginPage.login('user', 'pass');- Update selectors here if the login page UI changes.
- Add new login-related actions as needed.