Show / Hide Table of Contents

Class AppElementDescription

The Object Description how to identify the UI Elemen for native Mobile Application

Inheritance
object
ElementDescription
AppElementDescription
Inherited Members
ElementDescription.driver
ElementDescription.UseDriver(WebDriver)
ElementDescription.FindElement()
ElementDescription.FindElement(int)
ElementDescription.FindElement(By)
ElementDescription.FindElement(By, int)
ElementDescription.Exists()
ElementDescription.Exists(int)
ElementDescription.Click()
ElementDescription.Perform(Action)
ElementDescription.Perform(Func<string, IWebElement>, string)
ElementDescription.Perform(Action<string>, string)
ElementDescription.Perform(Action<int>, int)
ElementDescription.Perform(Func<bool>)
ElementDescription.Perform(Func<byte[]>)
ElementDescription.GetScreenshot()
ElementDescription.Perform(Func<string>)
ElementDescription.Perform(Func<string, string>, string)
ElementDescription.InternalClick()
ElementDescription.SendKeys(string)
ElementDescription.SetValue(string)
ElementDescription.GetText()
ElementDescription.Value
ElementDescription.IsSelected
ElementDescription.IsEnabled
ElementDescription.IsDisplayed
ElementDescription.Clear()
ElementDescription.GetAttribute(string)
ElementDescription.GetProperty(string)
ElementDescription.FindElements(By)
ElementDescription.FindElements()
ElementDescription.FindElements(int)
Namespace: AxaFrance.WebEngine.MobileApp
Assembly: AxaFrance.WebEngine.MobileApp.dll
Syntax
public class AppElementDescription : ElementDescription

Constructors

| Edit this page View Source

AppElementDescription()

Initialize the element description. If the element is not part of PageObject, you need to call UseDriver(WebDriver) to indicate with WebDriver will be used.

Declaration
public AppElementDescription()
| Edit this page View Source

AppElementDescription(WebDriver)

Initialize the element description using given WebDriver

Declaration
public AppElementDescription(WebDriver driver)
Parameters
Type Name Description
WebDriver driver

WebDriver instance

Properties

| Edit this page View Source

AccessbilityId

To identify element via it's AccessibilityId. Id and AccessibilityId can't be used in the same time.

Declaration
public string AccessbilityId { get; set; }
Property Value
Type Description
string
| Edit this page View Source

AndroidDataMatcher

Using Android DataMatcher selector, only available for Android applications (Espresso). When using AndroidDataMatcher, other locators will be ignored.

Declaration
public string AndroidDataMatcher { get; set; }
Property Value
Type Description
string
| Edit this page View Source

ClassName

Classname of the element.

Declaration
public string ClassName { get; set; }
Property Value
Type Description
string
| Edit this page View Source

ContentDescription

To identify elements via it's content-desc. Name and ContentDescription can't be used in the same time.

Declaration
public string ContentDescription { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Id

Identifier of the element

Declaration
public string Id { get; set; }
Property Value
Type Description
string
| Edit this page View Source

ImageLocator

Using Image element matching (AI-based element finding). Useful when standard locators don't work. Requires Appium image plugin.

Declaration
public string ImageLocator { get; set; }
Property Value
Type Description
string
| Edit this page View Source

IosClassChain

Using IOS Class Chain, only avaiable for iOS applications. When using IosClassChain, other locators will be ignored..

Declaration
public string IosClassChain { get; set; }
Property Value
Type Description
string
| Edit this page View Source

IosPredicate

Using iOS NSPredicate string, only available for iOS applications. When using IosPredicate, other locators will be ignored. More powerful than IosClassChain for complex queries.

Declaration
public string IosPredicate { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Name

The Name property of the element. Name and ContentDescription can't be used in the same time, or Name attribute will be ignored.

Declaration
public string Name { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Text

Text of Innertext of the element

Declaration
public string Text { get; set; }
Property Value
Type Description
string
| Edit this page View Source

UIAutomatorSelector

Using UIAutomator selector, only avaiable for Android applications. When using UIAutomator selector, other locators will be ignored.

Declaration
public string UIAutomatorSelector { get; set; }
Property Value
Type Description
string
| Edit this page View Source

XPath

XPath of the element. Please avoid to use XPATH if another identification approche is available.

Declaration
public string XPath { get; set; }
Property Value
Type Description
string

Methods

| Edit this page View Source

ApplyAttribute(FindsByAttribute)

Applies the locator defined in FindsByAttribute. this function is called automatically before InternalFindElements()

Declaration
public override void ApplyAttribute(FindsByAttribute attr)
Parameters
Type Name Description
FindsByAttribute attr
Overrides
ElementDescription.ApplyAttribute(FindsByAttribute)
| Edit this page View Source

DoubleTap()

Performs a double tap on the current element (useful for zoom, selection, special interactions)

Declaration
public void DoubleTap()
| Edit this page View Source

DragAndDropTo(AppElementDescription)

Drags the current element and drops it at a target element (useful for reordering lists, moving items)

Declaration
public void DragAndDropTo(AppElementDescription target)
Parameters
Type Name Description
AppElementDescription target

The target element to drop onto

| Edit this page View Source

HideKeyboard()

Hides the on-screen keyboard (works on both Android and iOS)

Declaration
public void HideKeyboard()
| Edit this page View Source

InternalFindElement()

Implemente element identifying algorithm, without the need of object synchronization.

Declaration
protected override IWebElement InternalFindElement()
Returns
Type Description
IWebElement

Identified test object.

Overrides
ElementDescription.InternalFindElement()
| Edit this page View Source

InternalFindElements()

Implemente element identifying algorithm, without the need of object synchronization.

Declaration
protected override IReadOnlyCollection<IWebElement> InternalFindElements()
Returns
Type Description
IReadOnlyCollection<IWebElement>

Identified test objects

Overrides
ElementDescription.InternalFindElements()
| Edit this page View Source

InternalGetScreenshot()

Implemente screenshot generation for the current specific element

Declaration
protected override byte[] InternalGetScreenshot()
Returns
Type Description
byte[]

The screenshot image in RAW Binary data format.

Overrides
ElementDescription.InternalGetScreenshot()
| Edit this page View Source

LongPress(int)

Performs a long press on the current element (useful for context menus, drag operations)

Declaration
public void LongPress(int durationSeconds = 2)
Parameters
Type Name Description
int durationSeconds

Duration of the press in seconds (default: 2)

| Edit this page View Source

ScrollDown()

Scroll the screen downward

Declaration
public void ScrollDown()
| Edit this page View Source

ScrollIntoView(ScrollDirection, int)

Tries to bring current element into viewport. This method will scroll the page multiple times to make the element visible. If after the maximum scroll action and the element is still not visible, the method will return false.

Declaration
public bool ScrollIntoView(ScrollDirection direction, int maxSwipe = 10)
Parameters
Type Name Description
ScrollDirection direction

The direction of the scroll

int maxSwipe

The maximum number of swipe action to make the element visible

Returns
Type Description
bool

True if the element is visible after scrolling. False when the element is not visible.

| Edit this page View Source

ScrollIntoView(int)

Tries to bring current element into viewport. This method will scroll down the page multiple times to make the element visible. If after the maximum scroll action and the element is still not visible, the method will return false.

Declaration
public bool ScrollIntoView(int maxSwipe = 10)
Parameters
Type Name Description
int maxSwipe
Returns
Type Description
bool

True if the element is visible after scrolling. False when the element is not visible.

| Edit this page View Source

ScrollUp()

Scroll the screen upward

Declaration
public void ScrollUp()
| Edit this page View Source

SwipeLeft()

Swipe left on the screen (useful for carousels, horizontal lists, dismissible cards)

Declaration
public void SwipeLeft()
| Edit this page View Source

SwipeRight()

Swipe right on the screen (useful for carousels, horizontal lists, navigation)

Declaration
public void SwipeRight()
| Edit this page View Source

ToString()

Shows a string representation of this AppElementDescription

Declaration
public override string ToString()
Returns
Type Description
string

A string representation of this AppElementDescription

Overrides
object.ToString()
| Edit this page View Source

WaitUntilClickable(int)

Waits until the element is clickable (visible and enabled)

Declaration
public bool WaitUntilClickable(int timeoutSeconds = 10)
Parameters
Type Name Description
int timeoutSeconds

Maximum wait time in seconds

Returns
Type Description
bool

True if element became clickable, false otherwise

  • Edit this page
  • View Source
In this article
Back to top Copyright ® 2016-2025 AXA France, All rights reserved.