Class WebXPath

Namespace
ProtoTest.Web
Assembly
ProtoTest.Web.dll

Shared XPath construction for web backends: literals, text predicates, and the table-cell-by-header expression. Public so additional backend packages translate identically.

public static class WebXPath
Inheritance
WebXPath
Inherited Members

Methods

Literal(string)

Quotes value as an XPath string literal, including mixed quotes.

public static string Literal(string value)

Parameters

value string

Returns

string

TableCellByHeader(TableCellByHeaderWebLocator, bool)

Builds the XPath for the cell under the column identified by a header cell. A document-scoped lookup (Playwright's page, Selenium's driver) starts at the document node, which has no direct table cells, so its axis widens to //.

public static string TableCellByHeader(TableCellByHeaderWebLocator locator, bool documentScoped = false)

Parameters

locator TableCellByHeaderWebLocator
documentScoped bool

Returns

string

TextPredicate(string, bool, bool)

Builds a normalize-space(.) comparison, optionally case-insensitive.

public static string TextPredicate(string value, bool exact, bool ignoreCase)

Parameters

value string
exact bool
ignoreCase bool

Returns

string