@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
16 lines (15 loc) • 450 B
JavaScript
;
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