Class AttributeExtensions
Defines a collection of extensions for retrieving element attributes.
Inheritance
Namespace: Legerity.Windows.Extensions
Assembly: Legerity.Windows.dll
Syntax
public static class AttributeExtensions : object
Methods
| Improve this Doc View SourceGetAutomationId(IWebElement)
Retrieves the AutomationId attribute from the specified element.
Declaration
public static string GetAutomationId(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.String | The AutomationId of the element. |
GetAutomationId<TElement>(IElementWrapper<TElement>)
Retrieves the AutomationId attribute from the specified element.
Declaration
public static string GetAutomationId<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve an AutomationId from. |
Returns
Type | Description |
---|---|
System.String | The AutomationId of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
GetHelpText(IWebElement)
Retrieves the HelpText attribute from the specified element.
Declaration
public static string GetHelpText(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.String | The HelpText of the element. |
GetHelpText<TElement>(IElementWrapper<TElement>)
Retrieves the HelpText attribute from the specified element.
Declaration
public static string GetHelpText<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the HelpText from. |
Returns
Type | Description |
---|---|
System.String | The HelpText of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
GetRangeMaximum(IWebElement)
Retrieves the RangeValue.Maximum attribute from the specified element.
Declaration
public static double GetRangeMaximum(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.Double | The range max value of the element. |
GetRangeMaximum<TElement>(IElementWrapper<TElement>)
Retrieves the RangeValue.Maximum attribute from the specified element.
Declaration
public static double GetRangeMaximum<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the range max value from. |
Returns
Type | Description |
---|---|
System.Double | The range max value of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
GetRangeMinimum(IWebElement)
Retrieves the RangeValue.Minimum attribute from the specified element.
Declaration
public static double GetRangeMinimum(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.Double | The range min value of the element. |
GetRangeMinimum<TElement>(IElementWrapper<TElement>)
Retrieves the RangeValue.Minimum attribute from the specified element.
Declaration
public static double GetRangeMinimum<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the range min value from. |
Returns
Type | Description |
---|---|
System.Double | The range min value of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
GetRangeSmallChange(IWebElement)
Retrieves the RangeValue.SmallChange attribute from the specified element.
Declaration
public static double GetRangeSmallChange(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.Double | The range step value of the element. |
GetRangeSmallChange<TElement>(IElementWrapper<TElement>)
Retrieves the RangeValue.SmallChange attribute from the specified element.
Declaration
public static double GetRangeSmallChange<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the range step value from. |
Returns
Type | Description |
---|---|
System.Double | The range step value of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
GetRangeValue(IWebElement)
Retrieves the RangeValue.Value attribute from the specified element.
Declaration
public static double GetRangeValue(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.Double | The range value of the element. |
GetRangeValue<TElement>(IElementWrapper<TElement>)
Retrieves the RangeValue.Value attribute from the specified element.
Declaration
public static double GetRangeValue<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the range value from. |
Returns
Type | Description |
---|---|
System.Double | The range value of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
GetToggleState(IWebElement)
Retrieves the Toggle.ToggleState attribute from the specified element.
Declaration
public static ToggleState GetToggleState(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
ToggleState | The ToggleState of the element. |
GetToggleState<TElement>(IElementWrapper<TElement>)
Retrieves the Toggle.ToggleState attribute from the specified element.
Declaration
public static ToggleState GetToggleState<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve a toggle state from. |
Returns
Type | Description |
---|---|
ToggleState | The ToggleState of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
GetValue(IWebElement)
Retrieves the Value.Value attribute from the specified element.
Declaration
public static string GetValue(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.String | The value of the element. |
GetValue<TElement>(IElementWrapper<TElement>)
Retrieves the Value.Value attribute from the specified element.
Declaration
public static string GetValue<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve a value from. |
Returns
Type | Description |
---|---|
System.String | The value of the element. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
IsRangeReadonly(IWebElement)
Retrieves the RangeValue.IsReadOnly attribute from the specified element.
Declaration
public static bool IsRangeReadonly(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the item is readonly. |
IsRangeReadonly<TElement>(IElementWrapper<TElement>)
Retrieves the RangeValue.IsReadOnly attribute from the specified element.
Declaration
public static bool IsRangeReadonly<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the readonly state from. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the item is readonly. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
IsReadonly(IWebElement)
Retrieves the Value.IsReadonly attribute from the specified element.
Declaration
public static bool IsReadonly(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the item is readonly. |
IsReadonly<TElement>(IElementWrapper<TElement>)
Retrieves the Value.IsReadonly attribute from the specified element.
Declaration
public static bool IsReadonly<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the readonly state from. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the item is readonly. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |
IsSelected(IWebElement)
Retrieves the SelectionItem.IsSelected attribute from the specified element.
Declaration
public static bool IsSelected(this IWebElement element)
Parameters
Type | Name | Description |
---|---|---|
IWebElement | element | The |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the item is selected. |
IsSelected<TElement>(IElementWrapper<TElement>)
Retrieves the SelectionItem.IsSelected attribute from the specified element.
Declaration
public static bool IsSelected<TElement>(this IElementWrapper<TElement> element)
where TElement : IWebElement
Parameters
Type | Name | Description |
---|---|---|
IElementWrapper<TElement> | element | The IElementWrapper<TElement> to retrieve the selected state from. |
Returns
Type | Description |
---|---|
System.Boolean | A value indicating whether the item is selected. |
Type Parameters
Name | Description |
---|---|
TElement | The type of |