Table of Contents

Class RxPathBuilder

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

Provides functionality to build RanoreXPath expressions for UI elements.

public static class RxPathBuilder
Inheritance
RxPathBuilder
Inherited Members

Remarks

The RxPathBuilder class includes methods and properties to construct optimized and robust paths for UI elements, enabling efficient identification and interaction.

Fields

DefaultWeightFilterThreshold

The weight threshold which determines whether an attribute is used in generated RxPaths.

public const int DefaultWeightFilterThreshold = 100

Field Value

int

LabelWeightFilterThreshold

The weight threshold which determines whether an attribute is used in element labels.

public const int LabelWeightFilterThreshold = 10

Field Value

int

Methods

BuildElementPath(Element, Element, PathBuildMode)

Builds a RanoreXPath for a given element.

public static RxPath BuildElementPath(Element relativeParent, Element element, PathBuildMode mode)

Parameters

relativeParent Element

The ancestor element to which the path should be relative to. If this parameter is null, an absolute path is built.

element Element

The node to build the path for.

mode PathBuildMode

The path building mode. This basically controls the degree of optimization applied to the path.

Returns

RxPath

The path of the specified element relative to the specified parent element.

BuildElementPath(Element, Element, PathBuildMode, bool)

Builds a RanoreXPath for a given element.

public static RxPath BuildElementPath(Element relativeParent, Element element, PathBuildMode mode, bool forceRobustPath)

Parameters

relativeParent Element

The ancestor element to which the path should be relative to. If this parameter is null, an absolute path is built.

element Element

The node to build the path for.

mode PathBuildMode

The path building mode. This basically controls the degree of optimization applied to the path.

forceRobustPath bool

Specifies if building robuts path sholub be forced.

Returns

RxPath

The path of the specified element relative to the specified parent element.