public final class AppiumServiceBuilder extends org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>
| Modifier and Type | Field and Description |
|---|---|
static String |
APPIUM_NODE_PROPERTY |
static String |
DEFAULT_LOCAL_IP_ADDRESS |
| Constructor and Description |
|---|
AppiumServiceBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected com.google.common.collect.ImmutableList<String> |
createArgs() |
protected AppiumDriverLocalService |
createDriverService(File nodeJSExecutable,
int nodeJSPort,
com.google.common.collect.ImmutableList<String> nodeArguments,
com.google.common.collect.ImmutableMap<String,String> nodeEnvironment) |
protected File |
findDefaultExecutable() |
AppiumServiceBuilder |
usingAnyFreePort()
Configures the appium server to start on any available port.
|
AppiumServiceBuilder |
usingDriverExecutable(File nodeJSExecutable)
Sets which Node.js the builder will use.
|
AppiumServiceBuilder |
usingPort(int port)
Sets which port the appium server should be started on.
|
AppiumServiceBuilder |
withAppiumJS(File appiumJS) |
AppiumServiceBuilder |
withArgument(ServerArgument argument)
Boolean arguments have a special moment:
the presence of an arguments means "true".
|
AppiumServiceBuilder |
withArgument(ServerArgument argument,
String value) |
AppiumServiceBuilder |
withEnvironment(Map<String,String> environment)
Defines the environment for the launched appium server.
|
AppiumServiceBuilder |
withIPAddress(String ipAddress) |
AppiumServiceBuilder |
withLogFile(File logFile)
Configures the appium server to write log to the given file.
|
AppiumServiceBuilder |
withStartUpTimeOut(long time,
TimeUnit timeUnit) |
public static final String APPIUM_NODE_PROPERTY
public static final String DEFAULT_LOCAL_IP_ADDRESS
protected File findDefaultExecutable()
findDefaultExecutable in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>public AppiumServiceBuilder withArgument(ServerArgument argument)
argument - is an instance which contains the argument namepublic AppiumServiceBuilder withArgument(ServerArgument argument, String value)
argument - is an instance which contains the argument namevalue - A non null string value. (Warn!!!) Boolean arguments have a special moment:
the presence of an arguments means "true". At this case an empty string
should be definedpublic AppiumServiceBuilder withAppiumJS(File appiumJS)
public AppiumServiceBuilder withIPAddress(String ipAddress)
public AppiumServiceBuilder withStartUpTimeOut(long time, TimeUnit timeUnit)
protected com.google.common.collect.ImmutableList<String> createArgs()
createArgs in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>public AppiumServiceBuilder usingDriverExecutable(File nodeJSExecutable)
usingDriverExecutable in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>nodeJSExecutable - The executable Node.js to use.public AppiumServiceBuilder usingPort(int port)
usingPort in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>port - The port to use; must be non-negative.public AppiumServiceBuilder usingAnyFreePort()
usingAnyFreePort in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>public AppiumServiceBuilder withEnvironment(Map<String,String> environment)
withEnvironment in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>environment - A map of the environment variables to launch the
appium server with.public AppiumServiceBuilder withLogFile(File logFile)
withLogFile in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>logFile - A file to write log to.protected AppiumDriverLocalService createDriverService(File nodeJSExecutable, int nodeJSPort, com.google.common.collect.ImmutableList<String> nodeArguments, com.google.common.collect.ImmutableMap<String,String> nodeEnvironment)
createDriverService in class org.openqa.selenium.remote.service.DriverService.Builder<AppiumDriverLocalService,AppiumServiceBuilder>Copyright © 2015. All rights reserved.