Class UnoElementWrapper
Defines an element wrapper for a
Inheritance
Namespace: Legerity.Uno.Elements
Assembly: Legerity.Uno.dll
Syntax
public abstract class UnoElementWrapper : IElementWrapper<RemoteWebElement>
Constructors
| Improve this Doc View SourceUnoElementWrapper(IWebElement)
Initializes a new instance of the UnoElementWrapper class.
Declaration
protected UnoElementWrapper(IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
UnoElementWrapper(RemoteWebElement)
Initializes a new instance of the UnoElementWrapper class.
Declaration
protected UnoElementWrapper(RemoteWebElement element)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The |
Properties
| Improve this Doc View SourceDriver
Gets the instance of the driver for the application.
Declaration
public RemoteWebDriver Driver { get; }
Property Value
Type | Description |
---|---|
RemoteWebDriver |
Element
Gets the original
Declaration
public RemoteWebElement Element { get; }
Property Value
Type | Description |
---|---|
RemoteWebElement |
IsEnabled
Gets a value indicating whether the element is enabled.
Declaration
public virtual bool IsEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsVisible
Gets a value indicating whether the element is visible.
Declaration
public virtual bool IsVisible { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceClick()
Clicks the element.
Declaration
public virtual void Click()
FindElement(By)
Finds a child element by the specified locator.
Declaration
public RemoteWebElement FindElement(By locator)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator to find a child element by. |
Returns
Type | Description |
---|---|
RemoteWebElement | The |
FindElements(By)
Finds a collection of child elements by the specified locator.
Declaration
public ReadOnlyCollection<RemoteWebElement> FindElements(By locator)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator to find child elements by. |
Returns
Type | Description |
---|---|
ReadOnlyCollection<RemoteWebElement> | The readonly collection of |
GetAttribute(String)
Gets the value of the specified attribute for this element.
Declaration
public virtual string GetAttribute(string attributeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | attributeName | The name of the attribute. |
Returns
Type | Description |
---|---|
System.String | The attribute's current value if it exists; otherwise, null. |
VerifyDriverElementShown(By, Nullable<TimeSpan>)
Determines whether the specified element is shown with the specified timeout.
Declaration
public void VerifyDriverElementShown(By locator, TimeSpan? timeout)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator to find a specific element. |
System.Nullable<TimeSpan> | timeout | The amount of time the driver should wait when searching for the |
VerifyDriverElementsShown(By, Nullable<TimeSpan>)
Determines whether the specified elements are shown with the specified timeout.
Declaration
public void VerifyDriverElementsShown(By locator, TimeSpan? timeout)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator to find a collection of elements. |
System.Nullable<TimeSpan> | timeout | The amount of time the driver should wait when searching for the |
VerifyElementNotShown(By)
Determines whether the given element is not shown.
Declaration
public void VerifyElementNotShown(By locator)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator for the element to locate. |
VerifyElementShown(By)
Determines whether the given element is shown.
Declaration
public void VerifyElementShown(By locator)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator for the element to find. |
VerifyElementShown(By, Nullable<TimeSpan>)
Determines whether the specified element is shown with the specified timeout.
Declaration
public void VerifyElementShown(By locator, TimeSpan? timeout)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator to find a specific element. |
System.Nullable<TimeSpan> | timeout | The amount of time the driver should wait when searching for the |
Exceptions
Type | Condition |
---|---|
Legerity.Exceptions.ElementNotShownException | Thrown if the element is not shown. |
VerifyElementsShown(By)
Determines whether the specified elements are shown.
Declaration
public void VerifyElementsShown(By locator)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator for the element to find. |
Exceptions
Type | Condition |
---|---|
Legerity.Exceptions.ElementNotShownException | Thrown if the elements are not shown. |
VerifyElementsShown(By, Nullable<TimeSpan>)
Determines whether the specified elements are shown with the specified timeout.
Declaration
public void VerifyElementsShown(By locator, TimeSpan? timeout)
Parameters
Type | Name | Description |
---|---|---|
By | locator | The locator to find a collection of elements. |
System.Nullable<TimeSpan> | timeout | The amount of time the driver should wait when searching for the |
Exceptions
Type | Condition |
---|---|
Legerity.Exceptions.ElementNotShownException | Thrown if the elements are not shown. |