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

org.jspringbot.keyword.selenium.action.SimulateDragAndDropAction Maven / Gradle / Ivy

There is a newer version: 1.9
Show newest version
package org.jspringbot.keyword.selenium.action;

import org.jspringbot.keyword.selenium.SeleniumHelper;
import org.openqa.selenium.interactions.Action;

import java.io.IOException;

public class SimulateDragAndDropAction implements Action {

    private SeleniumHelper helper;

    private String srcLocator;

    private String destLocator;

    public SimulateDragAndDropAction(SeleniumHelper helper, String srcLocator, String destLocator) {
        this.helper = helper;
        this.srcLocator = srcLocator;
        this.destLocator = destLocator;
    }

    @Override
    public void perform() {
        try {
            helper.simulateDragAndDrop(srcLocator, destLocator);
        } catch (IOException e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy