Any(By[]) Method

Definition

Assembly HeadlessTestingFramework.dll

Combines multiple locators with OR logic.

public static By Any(params By[] locators)

Parameters

locators
By[]

The locators to combine.

Returns

By
A By locator that matches any condition.

Examples

var element = driver.FindElement(By.Any(By.Id("btn1"), By.Id("btn2")));