Click or drag to resize

LocatorExtensionsToBy Method

Framework to automate tests using Selenium WebDriver
From the locator to selenium by converter.

Namespace: Ocaramba.Extensions
Assembly: OcarambaLite (in OcarambaLite.dll) Version: 1.0.0+d8e789f8644d1a9b63485ad7914acf4f489f3ef9
Syntax
C#
public static By ToBy(
	this ElementLocator locator
)
Request Example

Parameters

locator  ElementLocator
The element locator.

Return Value

By
The Selenium By.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ElementLocator. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Example
Using standard method FindElement, even we have locator as ElementLocator:
C#
private readonly ElementLocator searchTextbox = new ElementLocator(Locator.Id, "SearchTextBoxId");
this.Driver.FindElement(searchTextbox.ToBy());
See Also