claude-playwright
Version:
Seamless integration between Claude Code and Playwright MCP for efficient browser automation and testing
39 lines • 1.06 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestPage = void 0;
const BasePage_1 = require("../pages/base/BasePage");
/**
* TestPage - Page Object Model
* Generated by claude-playwright scaffold
*/
class TestPage extends BasePage_1.BasePage {
constructor(page) {
super(page);
// Page URL
this.pageUrl = 'https://example.com';
// Locators
this.mainContent = '[data-testid="main-content"], main, .content';
}
// Navigation
async goto() {
await this.navigateTo(this.pageUrl);
await this.waitForNetworkIdle();
}
async waitForLoad() {
await this.waitForNetworkIdle();
}
// Actions
async clickMainContent() {
await this.clickAndWait(this.mainContent);
}
// Assertions
async expectPageLoaded() {
await this.expectElementVisible(this.mainContent);
}
// Helper Methods
async isLoaded() {
return true;
}
}
exports.TestPage = TestPage;
//# sourceMappingURL=TestPage.js.map
;