Class RemoteWebElementExtensions
Defines a collection of extensions for
Inheritance
Namespace: Legerity.Uno.Extensions
Assembly: Legerity.Uno.dll
Syntax
public static class RemoteWebElementExtensions : object
Methods
| Improve this Doc View SourceFindElementByAutomationId(RemoteWebElement, String)
Finds the first element under the given element that matches the given automation identifier.
To find element for platforms supported by Uno, set the following in your App.xaml.cs constructor.
Uno.UI.FrameworkElementHelper.IsUiAutomationMappingEnabled = true;
For improvements to finding elements for web applications, also set the following in your App.xaml.cs constructor.
Uno.UI.FeatureConfiguration.UIElement.AssignDOMXamlName = true;
Declaration
public static RemoteWebElement FindElementByAutomationId(this RemoteWebElement element, string automationId)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The element. |
System.String | automationId | The automation identifier. |
Returns
Type | Description |
---|---|
RemoteWebElement | The |
FindElementByXamlName(RemoteWebElement, String)
Finds the first Uno Platform web element under the given element that matches the given x:Name value.
To find elements with this method for web applications, set the following in your App.xaml.cs.
Uno.UI.FeatureConfiguration.UIElement.AssignDOMXamlName = true;
Declaration
public static RemoteWebElement FindElementByXamlName(this RemoteWebElement element, string name)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The web element. |
System.String | name | The x:Name of the element to find. |
Returns
Type | Description |
---|---|
RemoteWebElement | The |
FindWebElementByXamlType(RemoteWebElement, String)
Finds the first Uno Platform web element under the given element that matches the given XAML type.
Declaration
public static RemoteWebElement FindWebElementByXamlType(this RemoteWebElement element, string xamlType)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The web element. |
System.String | xamlType | The XAML type. Windows control types can be referenced by the element wrapper's WindowsType value. |
Returns
Type | Description |
---|---|
RemoteWebElement | The |
VerifyNameOrAutomationIdContains(RemoteWebElement, String)
Verifies the elements name or Automation ID based on the given partial compare value.
Declaration
public static bool VerifyNameOrAutomationIdContains(this RemoteWebElement element, string compare)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The element to verify. |
System.String | compare | The partial value to verify is the name or Automation ID. |
Returns
Type | Description |
---|---|
System.Boolean | True if the element's name or Automation ID matches partially; otherwise, false. |
VerifyNameOrAutomationIdEquals(RemoteWebElement, String)
Verifies the elements name or AutomationId based on the given compare.
Declaration
public static bool VerifyNameOrAutomationIdEquals(this RemoteWebElement element, string compare)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | 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. |