Class RepoItemInfo
- Namespace
- Ranorex.Core.Repository
- Assembly
- Ranorex.Core.dll
Contains information about a RepositoryItem.
public class RepoItemInfo : IReportMetadata
- Inheritance
-
RepoItemInfo
- Implements
- Inherited Members
Constructors
RepoItemInfo(RepoGenBaseFolder, string, RxPath, RxPath, Duration, bool?, string)
Creates a new instance.
public RepoItemInfo(RepoGenBaseFolder parentFolder, string name, RxPath path, RxPath robustPath, Duration searchTimeout, bool? useEnsureVisible, string itemId)
Parameters
parentFolderRepoGenBaseFolderThe parent folder of the associated repository item.
namestringThe name of the associated repository item.
pathRxPathThe path of the associated repository item.
robustPathRxPathThe robust path of the associated repository item.
searchTimeoutDurationThe search timeout of the associated repository item.
useEnsureVisiblebool?The value set to UseEnsureVisible of the adapter created for the associated repository item.
itemIdstringThe id of the associated repository item.
RepoItemInfo(RepoGenBaseFolder, string, RxPath, Duration, bool?)
Creates a new instance.
public RepoItemInfo(RepoGenBaseFolder parentFolder, string name, RxPath path, Duration searchTimeout, bool? useEnsureVisible)
Parameters
parentFolderRepoGenBaseFolderThe parent folder of the associated repository item.
namestringThe name of the associated repository item.
pathRxPathThe path of the associated repository item.
searchTimeoutDurationThe search timeout of the associated repository item.
useEnsureVisiblebool?The value set to UseEnsureVisible of the adapter created for the associated repository item.
RepoItemInfo(RepoGenBaseFolder, string, RxPath, Duration, bool?, string)
Creates a new instance.
public RepoItemInfo(RepoGenBaseFolder parentFolder, string name, RxPath path, Duration searchTimeout, bool? useEnsureVisible, string itemId)
Parameters
parentFolderRepoGenBaseFolderThe parent folder of the associated repository item.
namestringThe name of the associated repository item.
pathRxPathThe path of the associated repository item.
searchTimeoutDurationThe search timeout of the associated repository item.
useEnsureVisiblebool?The value set to UseEnsureVisible of the adapter created for the associated repository item.
itemIdstringThe id of the associated repository item.
Properties
AbsolutePath
Gets the absolute path of the associated repository item.
public RxPath AbsolutePath { get; }
Property Value
Children
Gets the children of this repository item.
public IList<RepoItemInfo> Children { get; }
Property Value
- IList<RepoItemInfo>
A a read-only list containing the children of the repository item.
Remarks
You can use this property to traverse the repository at runtime.
FullName
Gets the name of the associated repository item preceded by the names of all folders that are parents of this item in a namespace-like representation, i.e. "AppFolder.RootedFolder.Folder.Item".
public string FullName { get; }
Property Value
Name
Gets the name of the associated repository item.
public string Name { get; }
Property Value
ParentFolder
Gets the parent folder of the associated repository item.
public RepoGenBaseFolder ParentFolder { get; }
Property Value
Path
Gets the path of the associated repository item (relative to its parent folder).
public RxPath Path { get; set; }
Property Value
RobustPath
Gets the robust path of the associated repository item (relative to its parent folder).
public RxPath RobustPath { get; set; }
Property Value
SearchTimeout
Gets the search timeout of the associated repository item (relative to its parent folder).
public Duration SearchTimeout { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
If value is negative.
UseEnsureVisible
Gets the value set to UseEnsureVisible of the adapter created for the associated repository item.
public bool? UseEnsureVisible { get; set; }
Property Value
- bool?
Methods
CreateAdapter<T>(bool)
Creates an adapter instance for the associated repository item.
public T CreateAdapter<T>(bool throwException) where T : Adapter
Parameters
throwExceptionboolA value indicating whether to throw an exception if creating an adapter failed.
Returns
- T
An adapter for the associated repository item or
nullif creating an adapter failed andthrowExceptionisfalse.
Type Parameters
TThe type of adapter to create. The supplied type must inherit from Adapter, but most not be the Adapter type itself.
CreateAdapter<T>(bool, Duration)
Creates an adapter instance for the associated repository item.
public T CreateAdapter<T>(bool throwException, Duration waitTimeout) where T : Adapter
Parameters
throwExceptionboolA value indicating whether to throw an exception if creating an adapter failed.
waitTimeoutDurationThe timeout used to search/wait for the element. The value overrides the Effective Timeout for the repository item (for that call only).
Returns
- T
An adapter for the associated repository item or
nullif creating an adapter failed andthrowExceptionisfalse.
Type Parameters
TThe type of adapter to create. The supplied type must inherit from Adapter, but most not be the Adapter type itself.
CreateAdapters<T>()
Creates adapter instances for all elements found for the associated repository item's path.
public IList<T> CreateAdapters<T>() where T : Adapter
Returns
- IList<T>
A list of adapters for all elements found for the associated repository item's path.
Type Parameters
TThe type of adapters to create. The supplied type must inherit from Adapter, but most not be the Adapter type itself.
Remarks
The results of this method may depend on whether folders in the hierarchy use caching.
CreateAdapters<T>(Duration)
Creates adapter instances for all elements found for the associated repository item's path.
public IList<T> CreateAdapters<T>(Duration waitTimeout) where T : Adapter
Parameters
waitTimeoutDurationThe timeout used to search/wait for the elements. The value overrides the Effective Timeout for the repository item (for that call only).
Returns
- IList<T>
A list of adapters for all elements found for the associated repository item's path.
Type Parameters
TThe type of adapters to create. The supplied type must inherit from Adapter, but most not be the Adapter type itself.
Remarks
The results of this method may depend on whether folders in the hierarchy use caching.
Exists()
Returns a value specifying whether the element for the associated repository item exists.
public bool Exists()
Returns
- bool
Trueif the element for the associated repository item exists.
Exists(Duration)
Returns a value specifying whether the element for the associated repository item exists within the specified timeout.
public bool Exists(Duration waitTimeout)
Parameters
waitTimeoutDurationThe timeout used to search/wait for the element. The value overrides the Effective Timeout for the repository item (for that call only).
Returns
- bool
Trueif the element for the associated repository item exists.
Exists<T>(Duration, out T)
Returns a value specifying whether the specified adapter for the associated repository item exists within the specified timeout.
public bool Exists<T>(Duration waitTimeout, out T adapter) where T : Adapter
Parameters
waitTimeoutDurationThe timeout used to search/wait for the element. The value overrides the Effective Timeout for the repository item (for that call only).
adapterTWhen this method returns, the adapter instance for the associated repository item, if it could be created; otherwise a
nullreference.
Returns
- bool
Trueif the specified adapter for the associated repository item exists.
Type Parameters
TThe type of adapter to create. The supplied type must inherit from Adapter, but most not be the Adapter type itself.
Exists<T>(out T)
Returns a value specifying whether the specified adapter for the associated repository item exists.
public bool Exists<T>(out T adapter) where T : Adapter
Parameters
adapterTWhen this method returns, the adapter instance for the associated repository item, if it could be created; otherwise a
nullreference.
Returns
- bool
Trueif the specified adapter for the associated repository item exists.
Type Parameters
TThe type of adapter to create. The supplied type must inherit from Adapter, but most not be the Adapter type itself.
FindAdapter<T>()
Finds and creates an adapter instance for the associated repository item.
public T FindAdapter<T>() where T : Adapter
Returns
- T
An adapter for the associated repository item
Type Parameters
TThe type of adapter to create. The supplied type must inherit from Adapter, but most not be the Adapter type itself.
Exceptions
- ElementNotFoundException
Throws exception if the element is not found.
GetImage(string)
Gets an image by ID.
protected CompressedImage GetImage(string id)
Parameters
idstringThe ID of an image to get.
Returns
- CompressedImage
The image.
GetImage(string, Rectangle)
Crops the given image by the specified ID and rectangle.
protected CompressedImage GetImage(string id, Rectangle cropRect)
Parameters
idstringThe ID of an image to get.
cropRectRectangleThe bounds of the sub-image inside the image to return.
Returns
- CompressedImage
The cropped image.
GetMetaInfos()
Returns a (non read-only!) dictionary of string key-value pairs specifying meta data for a report.
public IDictionary<string, string> GetMetaInfos()
Returns
- IDictionary<string, string>
A (non read-only!) dictionary of strings.
ToString()
Returns a string representation, i.e. the FullName, of this instance.
public override string ToString()
Returns
WaitForAttributeContains(Duration, string, object)
Waits until an element attribute of the associated repository item contains a specified value.
public void WaitForAttributeContains(Duration waitTimeout, string name, object value)
Parameters
waitTimeoutDurationThe time in ms to wait for the attribute to contain the specified value.
namestringThe name of the attribute to be validated.
valueobjectThe value that the attribute should contain.
Exceptions
- RanorexException
If the associated item stops existing or if the timeout is reached.
WaitForAttributeEqual(Duration, string, object)
Waits until an element attribute of the associated repository item equals a specified value.
public void WaitForAttributeEqual(Duration waitTimeout, string name, object value)
Parameters
waitTimeoutDurationThe time in ms to wait for the attribute to equal the specified value.
namestringThe name of the attribute to be validated.
valueobjectThe value that the attribute should equal.
Exceptions
- RanorexException
If the associated item stops existing or if the timeout is reached.
WaitForAttributeNotContains(Duration, string, object)
Waits until an element attribute of the associated repository item does not contain a specified value.
public void WaitForAttributeNotContains(Duration waitTimeout, string name, object value)
Parameters
waitTimeoutDurationThe time in ms to wait for the attribute to not contain the specified value.
namestringThe name of the attribute to be validated.
valueobjectThe value that the attribute should not contain.
Exceptions
- RanorexException
If the associated item stops existing or if the timeout is reached.
WaitForAttributeNotEqual(Duration, string, object)
Waits until an element attribute of the associated repository item does not equal a specified value.
public void WaitForAttributeNotEqual(Duration waitTimeout, string name, object value)
Parameters
waitTimeoutDurationThe time in ms to wait for the attribute to not equal the specified value.
namestringThe name of the attribute to be validated.
valueobjectThe value that the attribute should not equal.
Exceptions
- RanorexException
If the associated item stops existing or if the timeout is reached.
WaitForExists(Duration)
Waits until the element for the associated repository item exists.
public void WaitForExists(Duration waitTimeout)
Parameters
waitTimeoutDurationThe time to wait for the element to exist.
Exceptions
- RanorexException
If the timeout is reached while validating the attribute of the element or if the element does not exist.
WaitForNotExists(Duration)
Waits until the element for the associated repository item ceases to exist.
public void WaitForNotExists(Duration waitTimeout)
Parameters
waitTimeoutDurationThe time to wait for the element to cease to exist.
Exceptions
- RanorexException
If the
waitTimeoutis reached while waiting for the item to cease to exist.