@wordpress/e2e-test-utils
Version:
End-To-End (E2E) test utils for WordPress.
10 lines • 352 B
JavaScript
/**
* 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.
*/
export async function clickMenuItem(label) {
const menuItem = await page.waitForXPath(`//*[@role="menu"]//*[text()="${label}"]`);
await menuItem.click();
}
//# sourceMappingURL=click-menu-item.js.map