All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.serenitybdd.screenplay.actions.DoubleClickOnBy Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
package net.serenitybdd.screenplay.actions;

import net.serenitybdd.screenplay.Actor;
import net.serenitybdd.screenplay.abilities.BrowseTheWeb;
import net.serenitybdd.annotations.Step;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import java.util.List;

public class DoubleClickOnBy extends ByAction {

    @Step("{0} double-clicks on #locators")
    public  void performAs(T theUser) {
        WebElement element = resolveFor(theUser);
        BrowseTheWeb.as(theUser).withAction().moveToElement(element).doubleClick().perform();
    }

    public DoubleClickOnBy(By... locators) {
        super(locators);
    }

    public DoubleClickOnBy(List locators) {
        super(locators.toArray(new By[]{}));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy