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

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

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

import net.serenitybdd.core.pages.ClickStrategy;

import static net.serenitybdd.core.pages.ClickStrategy.*;

abstract class ClickOnClickable implements ClickInteraction {

    protected ClickStrategy clickStrategy = WAIT_UNTIL_PRESENT;

    @Override
    public ClickInteraction afterWaitingUntilEnabled() {
        clickStrategy = WAIT_UNTIL_ENABLED;
        return this;
    }

    @Override
    public ClickInteraction afterWaitingUntilPresent() {
        clickStrategy = WAIT_UNTIL_PRESENT;
        return this;
    }

    @Override
    public ClickInteraction withNoDelay() {
        clickStrategy = IMMEDIATE;
        return this;
    }

    public ClickStrategy getClickStrategy() {
        return clickStrategy;
    }

    public ClickInteraction withStrategy(ClickStrategy clickStrategy) {
        this.clickStrategy = clickStrategy;
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy