Package co.verisoft.fw.selenium.drivers
Class DecoratedMobileDriver
- java.lang.Object
-
- co.verisoft.fw.selenium.drivers.DecoratedDriver
-
- co.verisoft.fw.selenium.drivers.DecoratedMobileDriver
-
- All Implemented Interfaces:
io.appium.java_client.battery.HasBattery
,io.appium.java_client.CanRememberExtensionPresence
,io.appium.java_client.ExecutesMethod
,io.appium.java_client.HasAppStrings
,io.appium.java_client.HasDeviceTime
,io.appium.java_client.HasOnScreenKeyboard
,io.appium.java_client.HasSettings
,io.appium.java_client.HidesKeyboard
,io.appium.java_client.InteractsWithApps
,io.appium.java_client.LocksDevice
,io.appium.java_client.PerformsTouchActions
,io.appium.java_client.PullsFiles
,io.appium.java_client.PushesFiles
,io.appium.java_client.remote.SupportsContextSwitching
,io.appium.java_client.remote.SupportsLocation
,io.appium.java_client.remote.SupportsRotation
,io.appium.java_client.screenrecording.CanRecordScreen
,io.appium.java_client.SupportsLegacyAppManagement
,org.openqa.selenium.ContextAware
,org.openqa.selenium.HasCapabilities
,org.openqa.selenium.html5.LocationContext
,org.openqa.selenium.JavascriptExecutor
,org.openqa.selenium.SearchContext
,org.openqa.selenium.TakesScreenshot
,org.openqa.selenium.WebDriver
,org.openqa.selenium.WrapsDriver
public class DecoratedMobileDriver extends DecoratedDriver implements io.appium.java_client.remote.SupportsContextSwitching, io.appium.java_client.remote.SupportsRotation, io.appium.java_client.remote.SupportsLocation, io.appium.java_client.HidesKeyboard, io.appium.java_client.HasDeviceTime, io.appium.java_client.PullsFiles, io.appium.java_client.InteractsWithApps, io.appium.java_client.SupportsLegacyAppManagement, io.appium.java_client.HasAppStrings, io.appium.java_client.PerformsTouchActions, io.appium.java_client.HasOnScreenKeyboard, io.appium.java_client.LocksDevice, io.appium.java_client.PushesFiles, io.appium.java_client.screenrecording.CanRecordScreen, io.appium.java_client.battery.HasBattery, io.appium.java_client.HasSettings
-
-
Field Summary
-
Fields inherited from class co.verisoft.fw.selenium.drivers.DecoratedDriver
decoratedDriver
-
-
Constructor Summary
Constructors Constructor Description DecoratedMobileDriver(@Nullable org.openqa.selenium.Capabilities capabilities)
DecoratedMobileDriver(URL url, @Nullable org.openqa.selenium.Capabilities capabilities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateApp(String bundleId)
void
activateApp(String bundleId, @Nullable io.appium.java_client.appmanagement.BaseActivateApplicationOptions options)
io.appium.java_client.ExecutesMethod
assertExtensionExists(String s)
void
closeApp()
org.openqa.selenium.WebDriver
context(String name)
org.openqa.selenium.remote.Response
execute(String s)
org.openqa.selenium.remote.Response
execute(String s, Map<String,?> map)
Map<String,String>
getAppStringMap()
Map<String,String>
getAppStringMap(String language)
Map<String,String>
getAppStringMap(String language, String stringFile)
io.appium.java_client.battery.BatteryInfo
getBatteryInfo()
@Nullable String
getContext()
Set<String>
getContextHandles()
String
getDeviceTime()
String
getDeviceTime(String format)
org.openqa.selenium.remote.html5.RemoteLocationContext
getLocationContext()
org.openqa.selenium.ScreenOrientation
getOrientation()
void
hideKeyboard()
void
installApp(String appPath)
void
installApp(String appPath, @Nullable io.appium.java_client.appmanagement.BaseInstallApplicationOptions options)
boolean
isAppInstalled(String bundleId)
boolean
isDeviceLocked()
boolean
isKeyboardShown()
void
launchApp()
org.openqa.selenium.html5.Location
location()
void
lockDevice()
void
lockDevice(Duration duration)
io.appium.java_client.ExecutesMethod
markExtensionAbsence(String s)
io.appium.java_client.MultiTouchAction
performMultiTouchAction(io.appium.java_client.MultiTouchAction multiAction)
io.appium.java_client.TouchAction
performTouchAction(io.appium.java_client.TouchAction touchAction)
byte[]
pullFile(String remotePath)
byte[]
pullFolder(String remotePath)
void
pushFile(String remotePath, byte[] base64Data)
void
pushFile(String remotePath, File file)
io.appium.java_client.appmanagement.ApplicationState
queryAppState(String bundleId)
boolean
removeApp(String bundleId)
boolean
removeApp(String bundleId, @Nullable io.appium.java_client.appmanagement.BaseRemoveApplicationOptions options)
void
resetApp()
void
rotate(org.openqa.selenium.DeviceRotation rotation)
void
rotate(org.openqa.selenium.ScreenOrientation orientation)
org.openqa.selenium.DeviceRotation
rotation()
void
runAppInBackground(Duration duration)
void
setLocation(org.openqa.selenium.html5.Location location)
String
startRecordingScreen()
<T extends io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions>
StringstartRecordingScreen(T options)
String
stopRecordingScreen()
<T extends io.appium.java_client.screenrecording.BaseStopScreenRecordingOptions>
StringstopRecordingScreen(T options)
boolean
terminateApp(String bundleId)
boolean
terminateApp(String bundleId, @Nullable io.appium.java_client.appmanagement.BaseTerminateApplicationOptions options)
void
unlockDevice()
-
Methods inherited from class co.verisoft.fw.selenium.drivers.DecoratedDriver
close, decorateDriver, decorateDriver, executeAsyncScript, executeScript, findElement, findElements, get, getCapabilities, getCurrentUrl, getPageSource, getScreenshotAs, getTitle, getWindowHandle, getWindowHandles, getWrappedDriver, manage, navigate, quit, switchTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.appium.java_client.HasSettings
getSettings, setSetting, setSetting, setSettings, setSettings
-
-
-
-
Constructor Detail
-
DecoratedMobileDriver
public DecoratedMobileDriver(@Nullable @Nullable org.openqa.selenium.Capabilities capabilities)
-
DecoratedMobileDriver
public DecoratedMobileDriver(URL url, @Nullable @Nullable org.openqa.selenium.Capabilities capabilities)
-
-
Method Detail
-
getBatteryInfo
public io.appium.java_client.battery.BatteryInfo getBatteryInfo()
- Specified by:
getBatteryInfo
in interfaceio.appium.java_client.battery.HasBattery
-
execute
public org.openqa.selenium.remote.Response execute(String s, Map<String,?> map)
- Specified by:
execute
in interfaceio.appium.java_client.ExecutesMethod
-
execute
public org.openqa.selenium.remote.Response execute(String s)
- Specified by:
execute
in interfaceio.appium.java_client.ExecutesMethod
-
rotation
public org.openqa.selenium.DeviceRotation rotation()
- Specified by:
rotation
in interfaceio.appium.java_client.remote.SupportsRotation
-
rotate
public void rotate(org.openqa.selenium.DeviceRotation rotation)
- Specified by:
rotate
in interfaceio.appium.java_client.remote.SupportsRotation
-
rotate
public void rotate(org.openqa.selenium.ScreenOrientation orientation)
- Specified by:
rotate
in interfaceio.appium.java_client.remote.SupportsRotation
-
getOrientation
public org.openqa.selenium.ScreenOrientation getOrientation()
- Specified by:
getOrientation
in interfaceio.appium.java_client.remote.SupportsRotation
-
startRecordingScreen
public <T extends io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions> String startRecordingScreen(T options)
- Specified by:
startRecordingScreen
in interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
startRecordingScreen
public String startRecordingScreen()
- Specified by:
startRecordingScreen
in interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
stopRecordingScreen
public <T extends io.appium.java_client.screenrecording.BaseStopScreenRecordingOptions> String stopRecordingScreen(T options)
- Specified by:
stopRecordingScreen
in interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
stopRecordingScreen
public String stopRecordingScreen()
- Specified by:
stopRecordingScreen
in interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
getLocationContext
public org.openqa.selenium.remote.html5.RemoteLocationContext getLocationContext()
- Specified by:
getLocationContext
in interfaceio.appium.java_client.remote.SupportsLocation
-
location
public org.openqa.selenium.html5.Location location()
- Specified by:
location
in interfaceorg.openqa.selenium.html5.LocationContext
- Specified by:
location
in interfaceio.appium.java_client.remote.SupportsLocation
-
setLocation
public void setLocation(org.openqa.selenium.html5.Location location)
- Specified by:
setLocation
in interfaceorg.openqa.selenium.html5.LocationContext
- Specified by:
setLocation
in interfaceio.appium.java_client.remote.SupportsLocation
-
getAppStringMap
public Map<String,String> getAppStringMap()
- Specified by:
getAppStringMap
in interfaceio.appium.java_client.HasAppStrings
-
getAppStringMap
public Map<String,String> getAppStringMap(String language)
- Specified by:
getAppStringMap
in interfaceio.appium.java_client.HasAppStrings
-
getAppStringMap
public Map<String,String> getAppStringMap(String language, String stringFile)
- Specified by:
getAppStringMap
in interfaceio.appium.java_client.HasAppStrings
-
getDeviceTime
public String getDeviceTime(String format)
- Specified by:
getDeviceTime
in interfaceio.appium.java_client.HasDeviceTime
-
getDeviceTime
public String getDeviceTime()
- Specified by:
getDeviceTime
in interfaceio.appium.java_client.HasDeviceTime
-
isKeyboardShown
public boolean isKeyboardShown()
- Specified by:
isKeyboardShown
in interfaceio.appium.java_client.HasOnScreenKeyboard
-
hideKeyboard
public void hideKeyboard()
- Specified by:
hideKeyboard
in interfaceio.appium.java_client.HidesKeyboard
-
installApp
public void installApp(String appPath)
- Specified by:
installApp
in interfaceio.appium.java_client.InteractsWithApps
-
installApp
public void installApp(String appPath, @Nullable @Nullable io.appium.java_client.appmanagement.BaseInstallApplicationOptions options)
- Specified by:
installApp
in interfaceio.appium.java_client.InteractsWithApps
-
isAppInstalled
public boolean isAppInstalled(String bundleId)
- Specified by:
isAppInstalled
in interfaceio.appium.java_client.InteractsWithApps
-
runAppInBackground
public void runAppInBackground(Duration duration)
- Specified by:
runAppInBackground
in interfaceio.appium.java_client.InteractsWithApps
-
removeApp
public boolean removeApp(String bundleId)
- Specified by:
removeApp
in interfaceio.appium.java_client.InteractsWithApps
-
removeApp
public boolean removeApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseRemoveApplicationOptions options)
- Specified by:
removeApp
in interfaceio.appium.java_client.InteractsWithApps
-
activateApp
public void activateApp(String bundleId)
- Specified by:
activateApp
in interfaceio.appium.java_client.InteractsWithApps
-
activateApp
public void activateApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseActivateApplicationOptions options)
- Specified by:
activateApp
in interfaceio.appium.java_client.InteractsWithApps
-
queryAppState
public io.appium.java_client.appmanagement.ApplicationState queryAppState(String bundleId)
- Specified by:
queryAppState
in interfaceio.appium.java_client.InteractsWithApps
-
terminateApp
public boolean terminateApp(String bundleId)
- Specified by:
terminateApp
in interfaceio.appium.java_client.InteractsWithApps
-
terminateApp
public boolean terminateApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseTerminateApplicationOptions options)
- Specified by:
terminateApp
in interfaceio.appium.java_client.InteractsWithApps
-
lockDevice
public void lockDevice()
- Specified by:
lockDevice
in interfaceio.appium.java_client.LocksDevice
-
lockDevice
public void lockDevice(Duration duration)
- Specified by:
lockDevice
in interfaceio.appium.java_client.LocksDevice
-
unlockDevice
public void unlockDevice()
- Specified by:
unlockDevice
in interfaceio.appium.java_client.LocksDevice
-
isDeviceLocked
public boolean isDeviceLocked()
- Specified by:
isDeviceLocked
in interfaceio.appium.java_client.LocksDevice
-
performTouchAction
public io.appium.java_client.TouchAction performTouchAction(io.appium.java_client.TouchAction touchAction)
- Specified by:
performTouchAction
in interfaceio.appium.java_client.PerformsTouchActions
-
performMultiTouchAction
public io.appium.java_client.MultiTouchAction performMultiTouchAction(io.appium.java_client.MultiTouchAction multiAction)
- Specified by:
performMultiTouchAction
in interfaceio.appium.java_client.PerformsTouchActions
-
pullFile
public byte[] pullFile(String remotePath)
- Specified by:
pullFile
in interfaceio.appium.java_client.PullsFiles
-
pullFolder
public byte[] pullFolder(String remotePath)
- Specified by:
pullFolder
in interfaceio.appium.java_client.PullsFiles
-
pushFile
public void pushFile(String remotePath, byte[] base64Data)
- Specified by:
pushFile
in interfaceio.appium.java_client.PushesFiles
-
pushFile
public void pushFile(String remotePath, File file) throws IOException
- Specified by:
pushFile
in interfaceio.appium.java_client.PushesFiles
- Throws:
IOException
-
launchApp
public void launchApp()
- Specified by:
launchApp
in interfaceio.appium.java_client.SupportsLegacyAppManagement
-
resetApp
public void resetApp()
- Specified by:
resetApp
in interfaceio.appium.java_client.SupportsLegacyAppManagement
-
closeApp
public void closeApp()
- Specified by:
closeApp
in interfaceio.appium.java_client.SupportsLegacyAppManagement
-
context
public org.openqa.selenium.WebDriver context(String name)
- Specified by:
context
in interfaceorg.openqa.selenium.ContextAware
- Specified by:
context
in interfaceio.appium.java_client.remote.SupportsContextSwitching
-
getContextHandles
public Set<String> getContextHandles()
- Specified by:
getContextHandles
in interfaceorg.openqa.selenium.ContextAware
- Specified by:
getContextHandles
in interfaceio.appium.java_client.remote.SupportsContextSwitching
-
getContext
@Nullable public @Nullable String getContext()
- Specified by:
getContext
in interfaceorg.openqa.selenium.ContextAware
- Specified by:
getContext
in interfaceio.appium.java_client.remote.SupportsContextSwitching
-
assertExtensionExists
public io.appium.java_client.ExecutesMethod assertExtensionExists(String s)
- Specified by:
assertExtensionExists
in interfaceio.appium.java_client.CanRememberExtensionPresence
-
markExtensionAbsence
public io.appium.java_client.ExecutesMethod markExtensionAbsence(String s)
- Specified by:
markExtensionAbsence
in interfaceio.appium.java_client.CanRememberExtensionPresence
-
-