@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
16 lines (15 loc) • 464 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.clickMenuItem = clickMenuItem;
/**
* Searches for an item in the menu with the text provided and clicks it.
*
* @param {string} label The label to search the menu item for.
*/
async function clickMenuItem(label) {
const menuItem = await page.waitForXPath(`//*[@role="menu"]//*[text()="${label}"]`);
await menuItem.click();
}
//# sourceMappingURL=click-menu-item.js.map