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

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

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

import static io.appium.java_client.android.AndroidMobileCommandHelper.getDisplayDensityCommand;
import static io.appium.java_client.android.AndroidMobileCommandHelper.getSystemBarsCommand;
import static io.appium.java_client.android.AndroidMobileCommandHelper.isKeyboardShownCommand;

import io.appium.java_client.CommandExecutionHelper;
import io.appium.java_client.ExecutesMethod;

import java.util.Map;

public interface HasDeviceDetails extends ExecutesMethod {
    /*
        Retrieve the display density of the Android device.
     */
    default Long getDisplayDensity() {
        return CommandExecutionHelper.execute(this, getDisplayDensityCommand());
    }

    /*
        Retrieve visibility and bounds information of the status and navigation bars.
     */
    default Map getSystemBars() {
        return CommandExecutionHelper.execute(this, getSystemBarsCommand());
    }

    /**
     * Check if the keyboard is displayed.
     *
     * @return true if keyboard is displayed. False otherwise
     */
    default boolean isKeyboardShown() {
        return CommandExecutionHelper.execute(this, isKeyboardShownCommand());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy