DEFAULT_LOCAL_PORT
Constructor and Description |
---|
RemoteDriver(String host,
String userName,
String password)
Initializes a new instance of the RemoteDriver class using the specified host, user name and password.
|
RemoteDriver(String host,
String userName,
String password,
int port)
Initializes a new instance of the RemoteDriver class using the specified host, user name, password and port number.
|
Modifier and Type | Method and Description |
---|---|
<T extends ObjectTreeNode> |
find(Class clazz,
SearchPattern pattern)
Searches for an object that matches the specified pattern.
|
<T extends ObjectTreeNode> |
find(Class clazz,
SearchPattern pattern,
int depth)
Searches for an object that matches the specified pattern.
|
<T extends ObjectTreeNode> |
find(Class clazz,
SearchPattern pattern,
int depth,
int timeout)
Searches for an object that matches the specified pattern.
|
<T extends ObjectTreeNode> |
findAll(Class clazz,
SearchPattern pattern)
Searches for objects that match the specified pattern.
|
<T extends ObjectTreeNode> |
findAll(Class clazz,
SearchPattern pattern,
int depth)
Searches for objects that match the specified pattern.
|
ApplicationManager |
getApplications()
Provides access to the "ApplicationManager" object used to run applications.
|
Desktop |
getDesktop()
Returns the object that represents the desktop.
|
Log |
getLog()
Provides access to the TestLeft test log.
|
OptionsManager |
getOptions()
Provides access to the OptionsManager object used configure test engine.
|
<T extends ObjectTreeNode> |
tryFind(Class clazz,
SearchPattern pattern)
Searches for an object that matches the specified pattern.
|
<T extends ObjectTreeNode> |
tryFind(Class clazz,
SearchPattern pattern,
int depth)
Searches for an object that matches the specified pattern.
|
<T extends ObjectTreeNode> |
tryFind(Class clazz,
SearchPattern pattern,
int depth,
Integer timeout)
Searches for an object that matches the specified pattern.
|
public RemoteDriver(String host, String userName, String password) throws RestConnectionRefused, RestIncorrectUsernameOrPassword
host
- The IP address or host name.userName
- The user name in the format "Domain\Username".password
- The user password.RestConnectionRefused
- Thrown if the connection is rejected.RestIncorrectUsernameOrPassword
- Thrown if an incorrect username or password is specified.public RemoteDriver(String host, String userName, String password, int port) throws RestConnectionRefused, RestIncorrectUsernameOrPassword
host
- The IP address or host name.userName
- The user name in the format "Domain\Username".password
- The user password.port
- The port number.RestConnectionRefused
- Throw if connection refusedRestIncorrectUsernameOrPassword
- Throws if user pass incorrect username or passwordpublic <T extends ObjectTreeNode> T find(Class clazz, SearchPattern pattern) throws ObjectTreeNodeNotFoundException, HttpException
find
in interface Driver
T
- The interface that will be implemented in the returned object.clazz
- The interface that will be implemented in the returned object.pattern
- The search pattern.ObjectTreeNodeNotFoundException
- Throws if can't connect to rest server.HttpException
- Will be thrown if there are network problems.public <T extends ObjectTreeNode> T find(Class clazz, SearchPattern pattern, int depth) throws ObjectTreeNodeNotFoundException, HttpException
find
in interface Driver
T
- The interface that will be implemented in the returned object.clazz
- The interface that will be implemented in the returned object.pattern
- The search pattern.depth
- The search depth.ObjectTreeNodeNotFoundException
- Throws if can't connect to rest server.HttpException
- Will be thrown if there are network problems.public <T extends ObjectTreeNode> T find(Class clazz, SearchPattern pattern, int depth, int timeout) throws ObjectTreeNodeNotFoundException, HttpException
find
in interface Driver
T
- The interface that will be implemented in the returned object.clazz
- The interface that will be implemented in the returned object.pattern
- The search pattern.depth
- The search depth.timeout
- The timeout, in milliseconds, used to wait for the object.ObjectTreeNodeNotFoundException
- Throws if can't connect to rest server.HttpException
- Will be thrown if there are network problems.public <T extends ObjectTreeNode> List<T> findAll(Class clazz, SearchPattern pattern) throws HttpException
findAll
in interface Driver
T
- The interface of the elements in the returned sequence.clazz
- The interface of the elements in the returned sequence.pattern
- The search pattern.HttpException
- Will be thrown if there are network problems.public <T extends ObjectTreeNode> List<T> findAll(Class clazz, SearchPattern pattern, int depth) throws HttpException
findAll
in interface Driver
T
- The interface of the elements in the returned sequence.clazz
- The interface of the elements in the returned sequence.pattern
- The search pattern.depth
- The search depth.HttpException
- Will be thrown if there are network problems.public <T extends ObjectTreeNode> FindResult<T> tryFind(Class clazz, SearchPattern pattern) throws HttpException
tryFind
in interface Driver
T
- The interface that will be implemented in the returned object.clazz
- The interface that will be implemented in the returned object.pattern
- The search pattern.HttpException
- Will be thrown if there are network problems.public <T extends ObjectTreeNode> FindResult<T> tryFind(Class clazz, SearchPattern pattern, int depth) throws HttpException
tryFind
in interface Driver
T
- The interface that will be implemented in the returned object.clazz
- The interface that will be implemented in the returned object.pattern
- The search pattern.depth
- The search depth.HttpException
- Will be thrown if there are network problems.public <T extends ObjectTreeNode> FindResult<T> tryFind(Class clazz, SearchPattern pattern, int depth, Integer timeout) throws HttpException
tryFind
in interface Driver
T
- The interface that will be implemented in the returned object.clazz
- The interface that will be implemented in the returned object.pattern
- The search pattern.depth
- The search depth.timeout
- The timeout used to wait for the object.HttpException
- Will be thrown if there are network problems.public Log getLog()
public OptionsManager getOptions()
getOptions
in interface Driver
OptionsManager
objectpublic ApplicationManager getApplications()
getApplications
in interface Driver
ApplicationManager
objectpublic Desktop getDesktop() throws HttpException
getDesktop
in interface Driver
Desktop
objectHttpException
- Will be thrown if there are network problems.Copyright © 2020 SmartBear Software. All Rights Reserved.