Package co.verisoft.fw.selenium.drivers
Class VerisoftMobileDriver
- java.lang.Object
-
- co.verisoft.fw.selenium.drivers.VerisoftDriver
-
- co.verisoft.fw.selenium.drivers.VerisoftMobileDriver
-
- All Implemented Interfaces:
io.appium.java_client.battery.HasBattery,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.interactions.Interactive,org.openqa.selenium.JavascriptExecutor,org.openqa.selenium.PrintsPage,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.virtualauthenticator.HasVirtualAuthenticator,org.openqa.selenium.WebDriver,org.openqa.selenium.WrapsDriver
public class VerisoftMobileDriver extends VerisoftDriver 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
VeriSoft mobile driver. A driver for mobile application. This driver refers to Android driver and ios driver only. All other drivers are not supported by VerisoftMobileDriver at present time. The driver supports both local and remote driver:-
VeriSoft mobile driver is a concrete class which implements all the interfaces AppiumDriver and DefaultGenericMobileDriver.
VeriSoftMobileDriver implements WebDriver behavior, and in addition adds functionality. The main functionality which is currently supported:
2. Extended logging
3. All available events are registered. See events in the "See Also" section
4. WebDriver is wrapped with EventFiringDecorator. See in the "See Also" section
The driver is instanciated by specifying the relevant DesiredCapabilities, and if the driver is a remote driver, specifying remote url. All of VeriSoft's ctors expectes at least a DesiredCapabilities object.- Since:
- 1.9.6
- Author:
- David Yehezkel, Nir Gallner @ www.VeriSoft.co
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class co.verisoft.fw.selenium.drivers.VerisoftDriver
VerisoftDriver.VerisoftDriverOptions, VerisoftDriver.VerisoftTargetLocator
-
-
Field Summary
-
Fields inherited from class co.verisoft.fw.selenium.drivers.VerisoftDriver
driver
-
-
Constructor Summary
Constructors Constructor Description VerisoftMobileDriver(URL remoteAddress, org.openqa.selenium.Capabilities capabilities)VerisoftMobileDriver(org.openqa.selenium.Capabilities capabilities)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivateApp(String bundleId)voidactivateApp(String bundleId, @Nullable io.appium.java_client.appmanagement.BaseActivateApplicationOptions options)voidcloseApp()org.openqa.selenium.WebDrivercontext(String name)org.openqa.selenium.remote.Responseexecute(String s)org.openqa.selenium.remote.Responseexecute(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.BatteryInfogetBatteryInfo()@Nullable StringgetContext()Set<String>getContextHandles()StringgetDeviceTime()StringgetDeviceTime(String format)org.openqa.selenium.remote.html5.RemoteLocationContextgetLocationContext()org.openqa.selenium.ScreenOrientationgetOrientation()voidhideKeyboard()voidinstallApp(String appPath)voidinstallApp(String appPath, @Nullable io.appium.java_client.appmanagement.BaseInstallApplicationOptions options)booleanisAppInstalled(String bundleId)booleanisDeviceLocked()booleanisKeyboardShown()voidlaunchApp()org.openqa.selenium.html5.Locationlocation()voidlockDevice()voidlockDevice(Duration duration)io.appium.java_client.MultiTouchActionperformMultiTouchAction(io.appium.java_client.MultiTouchAction multiAction)io.appium.java_client.TouchActionperformTouchAction(io.appium.java_client.TouchAction touchAction)byte[]pullFile(String remotePath)byte[]pullFolder(String remotePath)voidpushFile(String remotePath, byte[] base64Data)voidpushFile(String remotePath, File file)io.appium.java_client.appmanagement.ApplicationStatequeryAppState(String bundleId)booleanremoveApp(String bundleId)booleanremoveApp(String bundleId, @Nullable io.appium.java_client.appmanagement.BaseRemoveApplicationOptions options)voidresetApp()voidrotate(org.openqa.selenium.DeviceRotation rotation)voidrotate(org.openqa.selenium.ScreenOrientation orientation)org.openqa.selenium.DeviceRotationrotation()voidrunAppInBackground(Duration duration)voidsetLocation(org.openqa.selenium.html5.Location location)StringstartRecordingScreen()<T extends io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions>
StringstartRecordingScreen(T options)StringstopRecordingScreen()<T extends io.appium.java_client.screenrecording.BaseStopScreenRecordingOptions>
StringstopRecordingScreen(T options)booleanterminateApp(String bundleId)booleanterminateApp(String bundleId, @Nullable io.appium.java_client.appmanagement.BaseTerminateApplicationOptions options)voidunlockDevice()-
Methods inherited from class co.verisoft.fw.selenium.drivers.VerisoftDriver
addVirtualAuthenticator, async, close, executeAsyncScript, executeScript, executeScript, findElement, findElements, get, getCapabilities, getCurrentUrl, getPageSource, getPinnedScripts, getScreenshotAs, getTitle, getWindowHandle, getWindowHandles, getWrappedDriver, manage, navigate, perform, pin, print, quit, removeVirtualAuthenticator, resetInputState, switchTo, unpin
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
VerisoftMobileDriver
public VerisoftMobileDriver(org.openqa.selenium.Capabilities capabilities)
-
VerisoftMobileDriver
public VerisoftMobileDriver(URL remoteAddress, org.openqa.selenium.Capabilities capabilities)
-
-
Method Detail
-
getBatteryInfo
public io.appium.java_client.battery.BatteryInfo getBatteryInfo()
- Specified by:
getBatteryInfoin interfaceio.appium.java_client.battery.HasBattery
-
execute
public org.openqa.selenium.remote.Response execute(String s, Map<String,?> map)
- Specified by:
executein interfaceio.appium.java_client.ExecutesMethod
-
execute
public org.openqa.selenium.remote.Response execute(String s)
- Specified by:
executein interfaceio.appium.java_client.ExecutesMethod
-
rotation
public org.openqa.selenium.DeviceRotation rotation()
- Specified by:
rotationin interfaceio.appium.java_client.remote.SupportsRotation
-
rotate
public void rotate(org.openqa.selenium.DeviceRotation rotation)
- Specified by:
rotatein interfaceio.appium.java_client.remote.SupportsRotation
-
rotate
public void rotate(org.openqa.selenium.ScreenOrientation orientation)
- Specified by:
rotatein interfaceio.appium.java_client.remote.SupportsRotation
-
getOrientation
public org.openqa.selenium.ScreenOrientation getOrientation()
- Specified by:
getOrientationin interfaceio.appium.java_client.remote.SupportsRotation
-
startRecordingScreen
public <T extends io.appium.java_client.screenrecording.BaseStartScreenRecordingOptions> String startRecordingScreen(T options)
- Specified by:
startRecordingScreenin interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
startRecordingScreen
public String startRecordingScreen()
- Specified by:
startRecordingScreenin interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
stopRecordingScreen
public <T extends io.appium.java_client.screenrecording.BaseStopScreenRecordingOptions> String stopRecordingScreen(T options)
- Specified by:
stopRecordingScreenin interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
stopRecordingScreen
public String stopRecordingScreen()
- Specified by:
stopRecordingScreenin interfaceio.appium.java_client.screenrecording.CanRecordScreen
-
getLocationContext
public org.openqa.selenium.remote.html5.RemoteLocationContext getLocationContext()
- Specified by:
getLocationContextin interfaceio.appium.java_client.remote.SupportsLocation
-
location
public org.openqa.selenium.html5.Location location()
- Specified by:
locationin interfaceorg.openqa.selenium.html5.LocationContext- Specified by:
locationin interfaceio.appium.java_client.remote.SupportsLocation
-
setLocation
public void setLocation(org.openqa.selenium.html5.Location location)
- Specified by:
setLocationin interfaceorg.openqa.selenium.html5.LocationContext- Specified by:
setLocationin interfaceio.appium.java_client.remote.SupportsLocation
-
getAppStringMap
public Map<String,String> getAppStringMap()
- Specified by:
getAppStringMapin interfaceio.appium.java_client.HasAppStrings
-
getAppStringMap
public Map<String,String> getAppStringMap(String language)
- Specified by:
getAppStringMapin interfaceio.appium.java_client.HasAppStrings
-
getAppStringMap
public Map<String,String> getAppStringMap(String language, String stringFile)
- Specified by:
getAppStringMapin interfaceio.appium.java_client.HasAppStrings
-
getDeviceTime
public String getDeviceTime(String format)
- Specified by:
getDeviceTimein interfaceio.appium.java_client.HasDeviceTime
-
getDeviceTime
public String getDeviceTime()
- Specified by:
getDeviceTimein interfaceio.appium.java_client.HasDeviceTime
-
isKeyboardShown
public boolean isKeyboardShown()
- Specified by:
isKeyboardShownin interfaceio.appium.java_client.HasOnScreenKeyboard
-
hideKeyboard
public void hideKeyboard()
- Specified by:
hideKeyboardin interfaceio.appium.java_client.HidesKeyboard
-
installApp
public void installApp(String appPath)
- Specified by:
installAppin interfaceio.appium.java_client.InteractsWithApps
-
installApp
public void installApp(String appPath, @Nullable @Nullable io.appium.java_client.appmanagement.BaseInstallApplicationOptions options)
- Specified by:
installAppin interfaceio.appium.java_client.InteractsWithApps
-
isAppInstalled
public boolean isAppInstalled(String bundleId)
- Specified by:
isAppInstalledin interfaceio.appium.java_client.InteractsWithApps
-
runAppInBackground
public void runAppInBackground(Duration duration)
- Specified by:
runAppInBackgroundin interfaceio.appium.java_client.InteractsWithApps
-
removeApp
public boolean removeApp(String bundleId)
- Specified by:
removeAppin interfaceio.appium.java_client.InteractsWithApps
-
removeApp
public boolean removeApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseRemoveApplicationOptions options)
- Specified by:
removeAppin interfaceio.appium.java_client.InteractsWithApps
-
activateApp
public void activateApp(String bundleId)
- Specified by:
activateAppin interfaceio.appium.java_client.InteractsWithApps
-
activateApp
public void activateApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseActivateApplicationOptions options)
- Specified by:
activateAppin interfaceio.appium.java_client.InteractsWithApps
-
queryAppState
public io.appium.java_client.appmanagement.ApplicationState queryAppState(String bundleId)
- Specified by:
queryAppStatein interfaceio.appium.java_client.InteractsWithApps
-
terminateApp
public boolean terminateApp(String bundleId)
- Specified by:
terminateAppin interfaceio.appium.java_client.InteractsWithApps
-
terminateApp
public boolean terminateApp(String bundleId, @Nullable @Nullable io.appium.java_client.appmanagement.BaseTerminateApplicationOptions options)
- Specified by:
terminateAppin interfaceio.appium.java_client.InteractsWithApps
-
lockDevice
public void lockDevice()
- Specified by:
lockDevicein interfaceio.appium.java_client.LocksDevice
-
lockDevice
public void lockDevice(Duration duration)
- Specified by:
lockDevicein interfaceio.appium.java_client.LocksDevice
-
unlockDevice
public void unlockDevice()
- Specified by:
unlockDevicein interfaceio.appium.java_client.LocksDevice
-
isDeviceLocked
public boolean isDeviceLocked()
- Specified by:
isDeviceLockedin interfaceio.appium.java_client.LocksDevice
-
performTouchAction
public io.appium.java_client.TouchAction performTouchAction(io.appium.java_client.TouchAction touchAction)
- Specified by:
performTouchActionin interfaceio.appium.java_client.PerformsTouchActions
-
performMultiTouchAction
public io.appium.java_client.MultiTouchAction performMultiTouchAction(io.appium.java_client.MultiTouchAction multiAction)
- Specified by:
performMultiTouchActionin interfaceio.appium.java_client.PerformsTouchActions
-
pullFile
public byte[] pullFile(String remotePath)
- Specified by:
pullFilein interfaceio.appium.java_client.PullsFiles
-
pullFolder
public byte[] pullFolder(String remotePath)
- Specified by:
pullFolderin interfaceio.appium.java_client.PullsFiles
-
pushFile
public void pushFile(String remotePath, byte[] base64Data)
- Specified by:
pushFilein interfaceio.appium.java_client.PushesFiles
-
pushFile
public void pushFile(String remotePath, File file) throws IOException
- Specified by:
pushFilein interfaceio.appium.java_client.PushesFiles- Throws:
IOException
-
launchApp
public void launchApp()
- Specified by:
launchAppin interfaceio.appium.java_client.SupportsLegacyAppManagement
-
resetApp
public void resetApp()
- Specified by:
resetAppin interfaceio.appium.java_client.SupportsLegacyAppManagement
-
closeApp
public void closeApp()
- Specified by:
closeAppin interfaceio.appium.java_client.SupportsLegacyAppManagement
-
context
public org.openqa.selenium.WebDriver context(String name)
- Specified by:
contextin interfaceorg.openqa.selenium.ContextAware- Specified by:
contextin interfaceio.appium.java_client.remote.SupportsContextSwitching
-
getContextHandles
public Set<String> getContextHandles()
- Specified by:
getContextHandlesin interfaceorg.openqa.selenium.ContextAware- Specified by:
getContextHandlesin interfaceio.appium.java_client.remote.SupportsContextSwitching
-
getContext
@Nullable public @Nullable String getContext()
- Specified by:
getContextin interfaceorg.openqa.selenium.ContextAware- Specified by:
getContextin interfaceio.appium.java_client.remote.SupportsContextSwitching
-
-