Table of Contents

Interface IAutomationDevice

Namespace
GroupeIsa.Neos.EndToEndTests.UI.Devices
Assembly
GroupeIsa.Neos.EndToEndTests.UI.dll

Provides the functionalities of the automation of an application for a device.

public interface IAutomationDevice : IDisposable
Inherited Members

Properties

DropdownIsVisible

Gets a value indicating whether the dropdown is visible.

bool DropdownIsVisible { get; }

Property Value

bool

Remarks

Don't use GetDropdown() if you just need to check visibility.

WebDriverProcessName

Gets the name of the web driver process.

string? WebDriverProcessName { get; }

Property Value

string

Methods

CreateActions()

Creates actions.

IAutomationAction CreateActions()

Returns

IAutomationAction

A automation action.

FindAndClickMenuItem(string)

Finds and clicks on the specified menu item.

void FindAndClickMenuItem(string path)

Parameters

path string

The path to access the menu item.

Remarks

Loop through and open the sub menus until we find the menu entry associated to the path Path is built with the template {MenuName}/{ChildMenuItemName}/{GrandChildMenuItemName}/... A menu can display maximum two depth level, so if a path have a depth greater than 3 (menuName, menuHeader, menuItem, someSubMenuItem), it is necessary to navigate to the sub-menu to display the desired item.

Exceptions

AutomationException

The menu item was not found.

FindErrorMessageBox()

Finds and waits until the displaying error message box is visible.

IErrorMessageBoxComponent? FindErrorMessageBox()

Returns

IErrorMessageBoxComponent

Error handler message box or null when no error message box is displayed.

FindFocusedComponent<TComponent>()

Finds the focused component.

TComponent? FindFocusedComponent<TComponent>() where TComponent : IAutomationComponent

Returns

TComponent

The focused component or null if not found.

Type Parameters

TComponent

The component type.

FindMessageBox()

Finds and waits until the displaying message box is visible.

IMessageBoxComponent? FindMessageBox()

Returns

IMessageBoxComponent

Message box component or null when no message box is displayed.

FindMessageBoxWithInput()

Finds and waits until the message box with input is visible.

IMessageBoxWithInputComponent? FindMessageBoxWithInput()

Returns

IMessageBoxWithInputComponent

Message box with input component or null when no message box with input is displayed.

GetBrowserLogs()

Gets the browser logs.

string GetBrowserLogs()

Returns

string

The browser logs.

GetDropdown()

Gets the displaying dropdown.

IDropdownComponent? GetDropdown()

Returns

IDropdownComponent

Dropdown component or null when no dropdown is displayed.

GetErrorMessageBox()

Gets and waits until the displaying error message box is visible.

IErrorMessageBoxComponent GetErrorMessageBox()

Returns

IErrorMessageBoxComponent

Message box component or null when no message box is displayed.

Exceptions

AutomationException

Thrown when no message box component was found.

GetGlobalSearchButton()

Gets the global search button.

IGlobalSearchButtonComponent GetGlobalSearchButton()

Returns

IGlobalSearchButtonComponent

Global search button component.

Exceptions

AutomationException

Thrown when no global search button component was found.

GetKeyboardValue(KeyboardKeys)

Gets the string value of the specified key of a keyboard.

string GetKeyboardValue(KeyboardKeys key)

Parameters

key KeyboardKeys

Key of the keyboard.

Returns

string

The string value.

GetLookupModal()

Gets and waits until the displaying modal is visible.

ILookupModalComponent GetLookupModal()

Returns

ILookupModalComponent

Lookup Modal component.

Exceptions

AutomationException

Thrown when no lookup modal component was found.

GetMessageBox()

Gets and waits until the displaying message box is visible.

IMessageBoxComponent GetMessageBox()

Returns

IMessageBoxComponent

Message box component.

Exceptions

AutomationException

Thrown when no message box component was found.

GetMessageBoxWithInput()

Gets and waits until the displaying message box with input is visible.

IMessageBoxWithInputComponent GetMessageBoxWithInput()

Returns

IMessageBoxWithInputComponent

Message box component.

Exceptions

AutomationException

Thrown when no message box with input component was found.

GetModal(IContentComponent?)

Gets and waits until the displaying modal is visible.

IModalComponent GetModal(IContentComponent? containingUIViewRootComponent = null)

Parameters

containingUIViewRootComponent IContentComponent

Returns

IModalComponent

Modal component.

Exceptions

AutomationException

Thrown when no modal component was found.

GetReportToast(int)

Gets and waits until the displaying report toast is visible.

IReportToastComponent GetReportToast(int index = 1)

Parameters

index int

The displayed index of toast (1 is the first toast displayed).

Returns

IReportToastComponent

Report toast component.

Exceptions

AutomationException

Thrown when no report toast component was found.

GetScreenInfo()

Gets current screen information to help debug.

string GetScreenInfo()

Returns

string

Current screen information.

GetScreenShot()

Gets current screen screenshot in base 64 format.

string GetScreenShot()

Returns

string

String representing the image in base 64.

GetToast()

Gets and waits until the displaying toast is visible.

IToastComponent GetToast()

Returns

IToastComponent

Toast component.

Exceptions

AutomationException

Thrown when no toast component was found.

GetUserButton()

Gets the user button.

IUserButtonComponent GetUserButton()

Returns

IUserButtonComponent

User button component.

Exceptions

AutomationException

Thrown when no user button component was found.

GetWindowSize()

Gets the size of the navigator window.

(int Width, int Height) GetWindowSize()

Returns

(int Width, int Height)

The width and height of the navigator window.

Launch(LaunchOptions?)

Launch the application.

Task<IContentComponent> Launch(LaunchOptions? options = null)

Parameters

options LaunchOptions

Launch options.

Returns

Task<IContentComponent>

The root component of the application.

Exceptions

AutomationException

Thrown when no root component was found.

LaunchNeosManager(LaunchOptions?)

Launches Neos Manager for the application.

Task<IContentComponent> LaunchNeosManager(LaunchOptions? options = null)

Parameters

options LaunchOptions

Launch options.

Returns

Task<IContentComponent>

The root component of the application.

Exceptions

AutomationException

Thrown when no root component was found.

LaunchNeosStudio(LaunchOptions?)

Launches Neos Studio for the application.

Task<IContentComponent> LaunchNeosStudio(LaunchOptions? options = null)

Parameters

options LaunchOptions

Launch options.

Returns

Task<IContentComponent>

The root component of the application.

Exceptions

AutomationException

Thrown when no root component was found.

OpenUIViewByMenuEntry(string, bool)

Opens a UI view from a menu entry.

Task<IFrameComponent> OpenUIViewByMenuEntry(string path, bool closeMenu = true)

Parameters

path string

The menu entry path. It must be defined using the following syntax : {MenuName}/{menuItemName}/{childMenuItemName}/...

Example :
A menu item 'Products' is a child of 'Catalog' item from the menu 'SalesAndCatalog'.
The resulting path is 'SalesAndCatalog/Catalog/Products'.

closeMenu bool

By default, the menu sidebar is closed after navigating to the UI. This can lead to the lost of the focus on the opened UI view.

Returns

Task<IFrameComponent>

The frame that contains the UIView.

OpenUIViewByMenuEntry<T>(string, bool)

Opens a UI view from a menu entry.

Task<T> OpenUIViewByMenuEntry<T>(string path, bool closeMenu = true) where T : IFrameComponent

Parameters

path string

The menu entry path. It must be defined using the following syntax : {MenuName}/{menuItemName}/{childMenuItemName}/...

Example :
A menu item 'Products' is a child of 'Catalog' item from the menu 'SalesAndCatalog'.
The resulting path is 'SalesAndCatalog/Catalog/Products'.

closeMenu bool

By default, the menu sidebar is closed after navigating to the UI. This can lead to the lost of the focus on the opened UI view.

Returns

Task<T>

The frame that contains the UIView.

Type Parameters

T

The frame component type.

PublishScreenShot(string?)

Takes a screenshot and publish it in folder defined by the environment variable NEOS_AUTOMATION_SCREENSHOTS_FOLDER.

string? PublishScreenShot(string? name = null)

Parameters

name string

The name of screenshot.

Returns

string

The path of published screenshot or null when NEOS_AUTOMATION_SCREENSHOTS_FOLDER variable is not defined.

ResizeWindow(int, int)

Resizes the navigator window.

void ResizeWindow(int width, int height)

Parameters

width int

Width of the navigator window.

height int

Height of the navigator window.

SaveScreenshot(string)

Saves a screenshot of the current screen with the specified file path.

void SaveScreenshot(string filePath)

Parameters

filePath string

The path of the screenshot file to save.

SelectFile(string, byte[])

Selects a file.

void SelectFile(string name, byte[] content)

Parameters

name string

File name with extension.

content byte[]

Content.

SendKeys(params KeyboardKeys[])

Sends a sequence of keystrokes.

void SendKeys(params KeyboardKeys[] keys)

Parameters

keys KeyboardKeys[]

The keystrokes to send to the component.

SendKeys(string)

Sends a sequence of keystrokes.

void SendKeys(string keys)

Parameters

keys string

The keystrokes to send to the component.

WaitUntil(Func<bool>)

Waits until the condition is true.

bool WaitUntil(Func<bool> condition)

Parameters

condition Func<bool>

A condition.

Returns

bool

true if the condition became true before the timeout, false otherwise.

WaitUntil(Func<bool>, int, int)

Waits until a condition is met.

bool WaitUntil(Func<bool> condition, int timeoutInMs, int sleepIntervalInMs = 200)

Parameters

condition Func<bool>

The condition to meet.

timeoutInMs int

The timeout value in milliseconds indicating how long to wait.

sleepIntervalInMs int

Delay in milliseconds between each evaluation.

Returns

bool

A value indicating whether the condition has been met during the alloted time.