public class ObjectRepository
Type Params | Return Type | Name and description |
---|---|---|
|
public static RequestObject |
findRequestObject(String requestObjectId, File objectFile) |
|
public static TestObject |
findTestObject(String testObjectRelativeId) Finds TestObject by its id or relative id |
|
public static TestObject |
findTestObject(String testObjectRelativeId, Map<String, Object> variables) Finds TestObject by its id or relative id using a variables map to parameterized its properties values |
|
public static WindowsTestObject |
findWindowsObject(String windowsObjectRelativeId) |
|
public static WindowsTestObject |
findWindowsObject(String windowsObjectRelativeId, Map<String, Object> variables) |
|
public static String |
getTestObjectId(String testObjectRelativeId) Returns test object id of a its relative id. |
|
public static String |
getTestObjectRelativeId(String testObjectId) Returns relative id of a test object's id. |
|
public static TestObject |
readTestObjectFile(String testObjectId, File objectFile, String projectDir) |
|
public static TestObject |
readTestObjectFile(String testObjectId, File objectFile, String projectDir, Map<String, Object> variables) |
Finds TestObject by its id or relative id
testObjectRelativeId
- Can be test object full id or test object relative id
Eg: Using "Object Repository/Sample Test Object" (full id) OR "Sample Test Object" (relative id) as
testObjectRelativeId
is accepted for the test object with id "Object Repository/Sample Test Object"
null
if the parameter is null or test object doesn't
existFinds TestObject by its id or relative id using a variables map to parameterized its properties values
Object properties values are parameterized using the ${variable} syntax
For example: the test object has a xpath property with value ".//div[@class='class']//a[text()='${Variable}']"
If the test object is created using findTestObject(testObjectId, ['Variable': 'Text']) then the result xpath property of the created test object will be ".//div[@class='class']//a[text()='Text']"
Use "$" to escape the "${" special characters, for example: "The variable $${${name}} must be used."
testObjectRelativeId
- Can be test object full id or test object relative id
Eg: Using "Object Repository/Sample Test Object" (full id) OR "Sample Test Object" (relative id) as
testObjectRelativeId
is accepted for the test object with id "Object Repository/Sample Test Object"
variables
- the variables map to parameterized the found test objectnull
if test object id is nullReturns test object id of a its relative id.
null
if testObjectRelativeId
is null.testObjectRelativeId
- Relative test object's id. Returns relative id of a test object's id. The relative id is cut "Object Repository/"
prefix from
the
test object's id.
testObjectId
- Full test object's id.null
if testObjectId
is null.