public final class

DriverAtoms

extends Object
java.lang.Object
   ↳ androidx.test.espresso.web.webdriver.DriverAtoms

Class Overview

A collection of Javascript Atoms from the WebDriver project.

Summary

Public Methods
static Atom<Evaluation> clearElement()
Clears content from an editable element.
static Atom<ElementReference> findElement(Locator locator, String value)
Finds an element using the provided locatorType strategy.
static Atom<List<ElementReference>> findMultipleElements(Locator locator, String value)
Finds multiple elements given a locator strategy.
static Atom<String> getText()
Returns the visible text beneath a given DOM element.
static Atom<ElementReference> selectActiveElement()
Finds the currently active element in the document.
static Atom<WindowReference> selectFrameByIdOrName(String idOrName, WindowReference root)
Selects a subframe of the given window by it's name or id.
static Atom<WindowReference> selectFrameByIdOrName(String idOrName)
Selects a subframe of the current window by it's name or id.
static Atom<WindowReference> selectFrameByIndex(int index)
Selects a subframe of the currently selected window by it's index.
static Atom<WindowReference> selectFrameByIndex(int index, WindowReference root)
Selects a subframe of the given window by it's index.
static Atom<Evaluation> webClick()
Simulates the javascript events to click on a particular element.
static Atom<Evaluation> webKeys(String text)
Simulates javascript key events sent to a certain element.
static Atom<Boolean> webScrollIntoView()
Returns true if the desired element is in view after scrolling.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Atom<Evaluation> clearElement ()

Clears content from an editable element.

Returns
Atom<Evaluation>

public static Atom<ElementReference> findElement (Locator locator, String value)

Finds an element using the provided locatorType strategy.

Parameters
locator Locator
value String
Returns
Atom<ElementReference>

public static Atom<List<ElementReference>> findMultipleElements (Locator locator, String value)

Finds multiple elements given a locator strategy.

Parameters
locator Locator
value String
Returns
Atom<List<ElementReference>>

public static Atom<String> getText ()

Returns the visible text beneath a given DOM element.

Returns
Atom<String>

public static Atom<ElementReference> selectActiveElement ()

Finds the currently active element in the document.

Returns
Atom<ElementReference>

public static Atom<WindowReference> selectFrameByIdOrName (String idOrName, WindowReference root)

Selects a subframe of the given window by it's name or id.

Parameters
idOrName String
root WindowReference
Returns
Atom<WindowReference>

public static Atom<WindowReference> selectFrameByIdOrName (String idOrName)

Selects a subframe of the current window by it's name or id.

Parameters
idOrName String
Returns
Atom<WindowReference>

public static Atom<WindowReference> selectFrameByIndex (int index)

Selects a subframe of the currently selected window by it's index.

Parameters
index int
Returns
Atom<WindowReference>

public static Atom<WindowReference> selectFrameByIndex (int index, WindowReference root)

Selects a subframe of the given window by it's index.

Parameters
index int
root WindowReference
Returns
Atom<WindowReference>

public static Atom<Evaluation> webClick ()

Simulates the javascript events to click on a particular element.

Returns
Atom<Evaluation>

public static Atom<Evaluation> webKeys (String text)

Simulates javascript key events sent to a certain element.

Parameters
text String
Returns
Atom<Evaluation>

public static Atom<Boolean> webScrollIntoView ()

Returns true if the desired element is in view after scrolling.

Returns
Atom<Boolean>