Class WindowsElementExtensions
Defines a collection of extensions for
Inheritance
Namespace: Legerity.Windows.Extensions
Assembly: Legerity.Windows.dll
Syntax
public static class WindowsElementExtensions : object
Methods
| Improve this Doc View SourceFindElementByAutomationId(WindowsElement, String)
Finds an element within the element with the given automationId.
Declaration
public static AppiumWebElement FindElementByAutomationId(this WindowsElement element, string automationId)
Parameters
| Type | Name | Description |
|---|---|---|
| WindowsElement | element | The element to search. |
| System.String | automationId | The automation ID associated with the element to locate. |
Returns
| Type | Description |
|---|---|
| AppiumWebElement | The located |
FindElementByAutomationId<TElement>(WindowsDriver<TElement>, String)
Finds an element within the driver with the given automationId.
Declaration
public static TElement FindElementByAutomationId<TElement>(this WindowsDriver<TElement> driver, string automationId)
where TElement : IWebElement
Parameters
| Type | Name | Description |
|---|---|---|
| WindowsDriver<TElement> | driver | The |
| System.String | automationId | The automation ID associated with the element to locate. |
Returns
| Type | Description |
|---|---|
| TElement | The located |
Type Parameters
| Name | Description |
|---|---|
| TElement | The type of |
VerifyNameOrAutomationIdContains(AppiumWebElement, String)
Verifies the elements name or AutomationId based on the given partial compare.
Declaration
public static bool VerifyNameOrAutomationIdContains(this AppiumWebElement element, string partialCompare)
Parameters
| Type | Name | Description |
|---|---|---|
| AppiumWebElement | element | The element to verify. |
| System.String | partialCompare | The partial value to verify is the name or AutomationId. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the element's name or AutomationId matches; otherwise, false. |
VerifyNameOrAutomationIdContains(WindowsElement, String)
Verifies the elements name or AutomationId based on the given partial compare.
Declaration
public static bool VerifyNameOrAutomationIdContains(this WindowsElement element, string partialCompare)
Parameters
| Type | Name | Description |
|---|---|---|
| WindowsElement | element | The element to verify. |
| System.String | partialCompare | The partial value to verify is the name or AutomationId. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the element's name or AutomationId partially matches; otherwise, false. |
VerifyNameOrAutomationIdEquals(AppiumWebElement, String)
Verifies the elements name or AutomationId based on the given compare.
Declaration
public static bool VerifyNameOrAutomationIdEquals(this AppiumWebElement element, string compare)
Parameters
| Type | Name | Description |
|---|---|---|
| AppiumWebElement | element | The element to verify. |
| System.String | compare | The value to verify is the name or AutomationId. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the element's name or AutomationId matches; otherwise, false. |
VerifyNameOrAutomationIdEquals(WindowsElement, String)
Verifies the elements name or AutomationId based on the given compare.
Declaration
public static bool VerifyNameOrAutomationIdEquals(this WindowsElement element, string compare)
Parameters
| Type | Name | Description |
|---|---|---|
| WindowsElement | element | The element to verify. |
| System.String | compare | The value to verify is the name or AutomationId. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the element's name or AutomationId matches; otherwise, false. |