A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://seleniumhq.github.io/selenium/docs/api/dotnet/webdriver/OpenQA.Selenium.RelativeBy.html below:

Class RelativeBy

Class RelativeBy
Namespace
OpenQA.Selenium
Assembly
WebDriver.dll

Provides a mechanism for finding elements spatially relative to other elements.

public sealed class RelativeBy : By
Inheritance

RelativeBy

Inherited Members
Methods Above(By)

Locates an element above the specified element.

public RelativeBy Above(By locator)
Parameters
locator By

The locator describing the element to look above for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If locator is null.

Above(IWebElement)

Locates an element above the specified element.

public RelativeBy Above(IWebElement element)
Parameters
element IWebElement

The element to look above for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If element is null.

Below(By)

Locates an element below the specified element.

public RelativeBy Below(By locator)
Parameters
locator By

The locator describing the element to look below for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If locator is null.

Below(IWebElement)

Locates an element below the specified element.

public RelativeBy Below(IWebElement element)
Parameters
element IWebElement

The element to look below for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If element is null.

FindElement(ISearchContext)

Finds the first element matching the criteria.

public override IWebElement FindElement(ISearchContext context)
Parameters
context ISearchContext

An ISearchContext object to use to search for the elements.

Returns
IWebElement

The first matching IWebElement on the current context.

Exceptions
ArgumentException

If context is not IJavaScriptExecutor or wraps a driver that does.

FindElements(ISearchContext)

Finds all elements matching the criteria.

public override ReadOnlyCollection<IWebElement> FindElements(ISearchContext context)
Parameters
context ISearchContext

An ISearchContext object to use to search for the elements.

Returns
ReadOnlyCollection<IWebElement>

A ReadOnlyCollection<T> of all WebElements matching the current criteria, or an empty list if nothing matches.

Exceptions
ArgumentException

If context is not IJavaScriptExecutor or wraps a driver that does.

LeftOf(By)

Locates an element to the left of the specified element.

public RelativeBy LeftOf(By locator)
Parameters
locator By

The locator describing the element to look to the left of for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If locator is null.

LeftOf(IWebElement)

Locates an element to the left of the specified element.

public RelativeBy LeftOf(IWebElement element)
Parameters
element IWebElement

The element to look to the left of for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If element is null.

Near(By)

Locates an element near the specified element.

public RelativeBy Near(By locator)
Parameters
locator By

The locator describing the element to look near for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If locator is null.

Near(By, int)

Locates an element near the specified element.

public RelativeBy Near(By locator, int atMostDistanceInPixels)
Parameters
locator By

The locator describing the element to look near for elements.

atMostDistanceInPixels int

The maximum distance from the element to be considered "near."

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If locator is null.

ArgumentOutOfRangeException

If atMostDistanceInPixels is not a positive value.

Near(IWebElement)

Locates an element near the specified element.

public RelativeBy Near(IWebElement element)
Parameters
element IWebElement

The element to look near for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If element is null.

Near(IWebElement, int)

Locates an element near the specified element.

public RelativeBy Near(IWebElement element, int atMostDistanceInPixels)
Parameters
element IWebElement

The element to look near for elements.

atMostDistanceInPixels int

The maximum distance from the element to be considered "near."

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If element is null.

ArgumentOutOfRangeException

If atMostDistanceInPixels is not a positive value.

RightOf(By)

Locates an element to the right of the specified element.

public RelativeBy RightOf(By locator)
Parameters
locator By

The locator describing the element to look to the right of for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If locator is null.

RightOf(IWebElement)

Locates an element to the right of the specified element.

public RelativeBy RightOf(IWebElement element)
Parameters
element IWebElement

The element to look to the right of for elements.

Returns
RelativeBy

A RelativeBy object for use in finding the elements.

Exceptions
ArgumentNullException

If element is null.

WithLocator(By)

Creates a new RelativeBy for finding elements with the specified tag name.

public static RelativeBy WithLocator(By by)
Parameters
by By

A By object that will be used to find the initial element.

Returns
RelativeBy

A RelativeBy object to be used in finding the elements.

Exceptions
ArgumentNullException

If by is null.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4