📜  双击 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:41.235000             🧑  作者: Mango

代码示例1
I would create an action class in order to right click or double click
To perform any actions against web element using actions class,
we need to locate the element first:

WebElement el = driver.findElement

Double Click (doubleClick):
        Actions actions = new Actions (driver).perform                          
        actions.doubleClick(el).perform()
        actions.moveTo(el).perform actions.doubleClick.perform             
        actions.moveTo(el).doubleClick().build.perform()
Right Click (contextClick):
    actions.contextClick(elementLocator).perform();