📅  最后修改于: 2022-03-11 15:03:45.139000             🧑  作者: Mango
async function rightClick (el) {
loc = el.getLocation(); //get the location of the element we want to click
await browser.actions().mouseMove(loc).perform(); //takes the mouse to hover the element
await browser.actions().click(protractor.Button.RIGHT).perform(); //performs the right click
};