public class DroidDrivers
extends java.lang.Object
DroidDriver
instance. This class is NOT
required, but it is handy and using a singleton driver can avoid memory leak when you have many
instances around (for example, one in every test - JUnit framework keeps the test instances in
memory after running them).Constructor and Description |
---|
DroidDrivers() |
Modifier and Type | Method and Description |
---|---|
static void |
checkUiAutomation()
Checks if UiAutomation API is available
|
static DroidDriver |
get()
Gets the singleton driver.
|
static boolean |
hasUiAutomation()
Returns whether the running target (device or emulator) has
UiAutomation
API, which is introduced in SDK API 18 (JELLY_BEAN_MR2). |
static DroidDriver |
newDriver()
Returns a new DroidDriver instance.
|
static void |
setSingleton(DroidDriver driver)
Sets the singleton driver.
|
public static DroidDriver get()
setSingleton(io.appium.droiddriver.DroidDriver)
has not been called.public static void setSingleton(DroidDriver driver)
public static boolean hasUiAutomation()
UiAutomation
API, which is introduced in SDK API 18 (JELLY_BEAN_MR2).public static DroidDriver newDriver()
instrumentation
as the
argument; otherwise a new platform-dependent default DroidDriver instance.public static void checkUiAutomation()