By::Path

Creates a new element locator that limits its discovered elements to ones matching the specified "path", starting from the Root element given to the function

Windows
MacOS
Linux

References

Module

AutomationDriver

Header

/Engine/Source/Developer/AutomationDriver/Public/LocateBy.h

Include

#include "LocateBy.h"

Source

/Engine/Source/Developer/AutomationDriver/Private/LocateBy.cpp

Syntax

static TSharedRef< IElementLocator, ESPMode::ThreadSafe > Path
(
    const FDriverElementRef & Root,
    const char * Value
)

Remarks

Creates a new element locator that limits its discovered elements to ones matching the specified "path", starting from the Root element given to the function

Path Example: "#Suite//Piano/Key//"

Path Syntax:

Suite = # represents that the following text is an explicit Id, in the case of a [SWidget](API\Runtime\SlateCore\Widgets\SWidget) it needs to be tagged with the driver Id metadata Piano = plain text represents general tags, in the case of a [SWidget](API\Runtime\SlateCore\Widgets\SWidget) it needs to have a Tag or TagMetadata with the appropriate plain text value = <> represents types, in the case of a [SWidget](API\Runtime\SlateCore\Widgets\SWidget) it should be the explicit type used in the SNew construction

Hierarchy is represented by forward slashes

/ = a single forward slash represents that the next value must match a direct child of the element matched before it = a double forward slash represents that the next value must match any descendant of the element matched before it

Reference the AutomationDriver.spec.cpp expectations for additional examples of the syntax in use

Returns

a locator which uses the specified path to discover appropriate elements

Parameters

Parameter

Description

Root

The reference to the element where the search will be started from

Value

The path to use