DriverAtoms

public final class DriverAtoms
extends Object

java.lang.Object
   ↳ android.support.test.espresso.web.webdriver.DriverAtoms


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)

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

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

Selects a subframe of the given 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.

Inherited methods

From class java.lang.Object

Public methods

clearElement

Atom<Evaluation> clearElement ()

Clears content from an editable element.

Returns
Atom<Evaluation>

findElement

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

Finds an element using the provided locatorType strategy.

Parameters
locator Locator

value String

Returns
Atom<ElementReference>

findMultipleElements

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

Finds multiple elements given a locator strategy.

Parameters
locator Locator

value String

Returns
Atom<List<ElementReference>>

getText

Atom<String> getText ()

Returns the visible text beneath a given DOM element.

Returns
Atom<String>

selectActiveElement

Atom<ElementReference> selectActiveElement ()

Finds the currently active element in the document.

Returns
Atom<ElementReference>

selectFrameByIdOrName

Atom<WindowReference> selectFrameByIdOrName (String idOrName)

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

Parameters
idOrName String

Returns
Atom<WindowReference>

selectFrameByIdOrName

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>

selectFrameByIndex

Atom<WindowReference> selectFrameByIndex (int index)

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

Parameters
index int

Returns
Atom<WindowReference>

selectFrameByIndex

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>

webClick

Atom<Evaluation> webClick ()

Simulates the javascript events to click on a particular element.

Returns
Atom<Evaluation>

webKeys

Atom<Evaluation> webKeys (String text)

Simulates javascript key events sent to a certain element.

Parameters
text String

Returns
Atom<Evaluation>

webScrollIntoView

Atom<Boolean> webScrollIntoView ()

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

Returns
Atom<Boolean>