LinkText(String) Method

Definition

Assembly HeadlessTestingFramework.dll

Locates elements by their link text (for hyperlinks/buttons). This is the standard Selenium locator - maps to Text matching in Avalonia.

public static By LinkText(string linkText)

Parameters

linkText
String

The exact link text.

Returns

By
A By locator for link text matching.

Examples

var link = driver.FindElement(By.LinkText("Click here"));