import { type Locator, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; export class VinLookupPage extends BasePage { readonly page: Page; readonly vinLookupTextBox: Locator; readonly lookupVinForMe: Locator; url = process.env['BASE_URL']! + '/?issPage=vin-lookup'; // TODO: Input correct URL constructor(page: Page) { super(page); this.page = page; this.vinLookupTextBox = page.getByRole('textbox', { name: 'Enter your VIN' }); this.lookupVinForMe = page.getByRole('link', { name: 'look up your VIN' }); // this.validateURL(this.url); } async enterVin(vin: string) { await this.vinLookupTextBox.fill(vin); } async triggerBailout() { await this.continueButton.click(); await this.lookupVinForMe.click(); } }