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

io.appium.java_client.android.Activity Maven / Gradle / Ivy

There is a newer version: 9.3.0
Show newest version
package io.appium.java_client.android;

import lombok.Data;
import lombok.experimental.Accessors;

import static com.google.common.base.Preconditions.checkArgument;
import static org.apache.commons.lang3.StringUtils.isBlank;

/**
 * This is a simple POJO class to support the {@link StartsActivity}.
 */
@Accessors(chain = true)
@Data
public class Activity {
    private final String appPackage;
    private final String appActivity;
    private String appWaitPackage;
    private String appWaitActivity;
    private String intentAction;
    private String intentCategory;
    private String intentFlags;
    private String optionalIntentArguments;
    private boolean stopApp;

    /**
     * A constructor with two mandatory parameters.
     *
     * @param appPackage  The value for the app package.
     * @param appActivity The value for the app activity.
     */
    public Activity(String appPackage, String appActivity) {
        checkArgument(!isBlank(appPackage),
            "App package should be defined as not empty or null string");
        checkArgument(!isBlank(appActivity),
            "App activity should be defined as not empty or null string");
        this.appPackage = appPackage;
        this.appActivity = appActivity;
        this.stopApp = true;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy