You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
479 B
21 lines
479 B
import {Locator, Page} from '@playwright/test';
|
|
|
|
class AnalyticsPage {
|
|
protected pageUrl:string;
|
|
private readonly page: Page;
|
|
public readonly body: Locator;
|
|
|
|
constructor(page: Page) {
|
|
this.page = page;
|
|
this.pageUrl = '/ghost/#/analytics';
|
|
this.body = page.locator('body');
|
|
}
|
|
|
|
async visit(url = null) {
|
|
const urlToVisit = url || this.pageUrl;
|
|
await this.page.goto(urlToVisit);
|
|
}
|
|
}
|
|
|
|
export default AnalyticsPage;
|