package org.getopentest.appium;

import io.appium.java_client.touch.WaitOptions;
import java.time.Duration;
import org.getopentest.appium.core.AppiumTestAction;

public class ActionsWait extends AppiumTestAction {

    @Override
    public void run() {
        super.run();

        Double seconds = this.readDoubleArgument("seconds");
        
        AppiumTestAction.getActionsInstance().waitAction(WaitOptions.waitOptions(Duration.ofMillis((long)(seconds * 1000))));
    }
}
