Skip to main content

Ellithium Interaction Classes

Ellithium provides a comprehensive set of interaction classes that offer a unified API for both web and mobile testing. These classes handle synchronization, waiting, and error reporting automatically, making test development more efficient and reliable.

Core Concept: DriverActions

The DriverActions class is the main entry point to all interactions:

DriverActions actions = new DriverActions(driver);

From this single point, you can access all the specialized interaction classes:

Available Interaction Classes

Interaction ClassAccess MethodDescription
Element Actionsactions.elements()Basic element interactions (click, type, etc.)
JavaScript Actionsactions.JSActions()JavaScript operations
Alert Actionsactions.alerts()Alert dialog handling
Frame Actionsactions.frames()iFrame operations
Mouse Actionsactions.mouse()Advanced mouse operations
Navigation Actionsactions.navigation()Browser navigation
Wait Actionsactions.waits()Specialized wait conditions
Window Actionsactions.windows()Window management
Key Press Actionsactions.keyPress()Keyboard interactions
Select Actionsactions.select()Dropdown operations
Screen Recorder ActionsscreenRecorderActionsVideo recording of test sessions

For a more detailed overview with code examples, see the Interactions Overview page.

Getting Started with Interactions

Here's a simple example that demonstrates the fluent interface for interactions:

// Initialize driver actions
DriverActions actions = new DriverActions(driver);

// Navigate to URL
actions.navigation().navigateToUrl("https://example.com/login");

// Fill login form
actions.elements().sendData(By.id("username"), "testuser");
actions.elements().sendData(By.id("password"), "password123");

// Click login button
actions.elements().clickOnElement(By.id("loginButton"));

// Wait for successful login
actions.waits().waitForUrlContains("/dashboard");
actions.elements().waitForElementToBeVisible(By.id("welcomeMessage"));

Web vs. Mobile Interactions

Most interaction classes work identically for both web and mobile testing, allowing you to use the same API across different platforms. For mobile-specific functionality, check the Mobile Testing documentation.