Share this page

# ByAny Class

A locator that locates elements that match one or more of the specified locators (attributes, tags, styles etc.).

## C# syntax

    public class ByAny : LeanFT.Selenium.By

## Inheritance hierarchy

    OpenQA.Selenium.By
            LeanFT.Selenium.By
                    LeanFT.Selenium.ByAny

Namespace: LeanFT.Selenium

Assembly: LeanFTForSelenium

The LeanFT.Selenium.ByAny class exposes the following members:

## Constructor summary

| Name | Description
--- | --- | ---
| ByAny(OpenQA.Selenium.By[]) | A constructor for the ByAny locator.

Back to top

## Method summary

| Name | Description
--- | --- | ---
| Attribute(System.String, System.String) | Returns a locator that locates elements according to a single attribute. (Inherited from LeanFT.Selenium.By)
| Attribute(System.String, System.Text.RegularExpressions.Regex) | Returns a locator that locates elements according to a single attribute, described using a regular expression.
| Attributes(System.Collections.Generic.IDictionary{System.String, System.Object}) | Returns a locator that locates elements according to one or more attributes. You can also use regular expressions. (Inherited from LeanFT.Selenium.By)
| ClassName(System.Text.RegularExpressions.Regex) | Returns a locator that locates elements by the provided regular expression className parameter. (Inherited from LeanFT.Selenium.By)
| Id(System.Text.RegularExpressions.Regex) | Returns a locator that locates elements by the provided regular expression ID parameter. (Inherited from LeanFT.Selenium.By)
| LinkText(System.Text.RegularExpressions.Regex) | Returns a locator that locates elements by the provided regular expression linkText parameter. (Inherited from LeanFT.Selenium.By)
| Name(System.Text.RegularExpressions.Regex) | Returns a locator that locates elements by the provided regular expression name parameter. (Inherited from LeanFT.Selenium.By)
| Role(System.String) | Returns a locator that locates elements by the provided role parameter. (Inherited from LeanFT.Selenium.By)
| Role(System.Text.RegularExpressions.Regex) | Returns a locator that locates elements by the provided regular expression role parameter. (Inherited from LeanFT.Selenium.By)
| Style(System.String, System.String) | Returns a locator that locates elements according to a single style. (Inherited from LeanFT.Selenium.By)
| Style(System.String, System.Text.RegularExpressions.Regex) | Returns a locator that locates elements according to a single style, described using a regular expression. (Inherited from LeanFT.Selenium.By)
| Styles(System.Collections.Generic.IDictionary{System.String, System.Object}) | Returns a locator that locates elements according to one or more styles. You can also use regular expressions. (Inherited from LeanFT.Selenium.By)
| TagName(System.Text.RegularExpressions.Regex) | Returns a locator that locates elements by the provided regular expression tagName parameter. (Inherited from LeanFT.Selenium.By)
| Type(System.String) | Returns a locator that locates elements by the provided type parameter. (Inherited from LeanFT.Selenium.By)
| Type(System.Text.RegularExpressions.Regex) | Returns a locator that locates elements by the provided regular expression type. (Inherited from LeanFT.Selenium.By)
| Visible(System.Boolean) | Returns a locator that locates elements that are either visible or not, depending on the parameter passed. (Inherited from LeanFT.Selenium.By)
| VisibleText(System.String) | Returns a locator that locates elements by the provided visibleText parameter. (Inherited from LeanFT.Selenium.By)
| VisibleText(System.Text.RegularExpressions.Regex) | Returns a locator that locates element by the provided regular expression visibleText parameter. (Inherited from LeanFT.Selenium.By)

Back to top

## ByAny(OpenQA.Selenium.By[])

A constructor for the ByAny locator.

C# Syntax

    public static ByAny(By[] bys)

Parameters

bys. The locators (Bys) by which the elements should be identified.

Back to top

See also:

- By Class
- LeanFT.Selenium Namespace

Tips to improve your search results... UFT Developer for Selenium SDK (.NET) Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: