UNPKG

@wordpress/e2e-test-utils

Version:
16 lines (15 loc) 450 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clickButton = clickButton; /** * Clicks a button based on the text on the button. * * @param {string} buttonText The text that appears on the button to click. */ async function clickButton(buttonText) { const button = await page.waitForXPath(`//button[contains(text(), '${buttonText}')]`); await button.click(); } //# sourceMappingURL=click-button.js.map