com.github.arachnidium.model.mobile.android.AndroidNativeContent Maven / Gradle / Ivy
package com.github.arachnidium.model.mobile.android;
import io.appium.java_client.android.AndroidDeviceActionShortcuts;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.HasAppStrings;
import com.github.arachnidium.core.MobileScreen;
import com.github.arachnidium.model.common.FunctionalPart;
import com.github.arachnidium.model.mobile.NativeContent;
/**
* The same as {@link NativeContent} with some capabilities specifically for Android
* It works only with {@link AndroidDriver}
*/
public abstract class AndroidNativeContent extends NativeContent implements HasAppStrings, AndroidDeviceActionShortcuts, IHasActivity{
/**
* @see FunctionalPart#FunctionalPart(FunctionalPart)
*
* @see NativeContent#Screen(FunctionalPart)
*/
protected AndroidNativeContent(NativeContent parent) {
super(parent);
}
/**
* @see FunctionalPart#FunctionalPart(com.github.arachnidium.core.Handle)
*
* @see NativeContent#Screen(MobileScreen)
*/
protected AndroidNativeContent(MobileScreen context) {
super(context);
}
@InteractiveMethod
@Override
public String currentActivity(){
return ((AndroidDriver) getWrappedDriver()).currentActivity();
}
@InteractiveMethod
@Override
public String getAppStrings() {
return ((AndroidDriver) getWrappedDriver()).getAppStrings();
}
@InteractiveMethod
@Override
public String getAppStrings(String language) {
return ((AndroidDriver) getWrappedDriver()).getAppStrings(language);
}
@InteractiveMethod
@Override
public void sendKeyEvent(int key, Integer metastate) {
((AndroidDriver) getWrappedDriver()).sendKeyEvent(key, metastate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy