public final class

Atoms

extends Object
java.lang.Object
   ↳ android.support.test.espresso.web.model.Atoms

Class Overview

Utility class wrapping simple and more commonly used atoms.

Summary

Public Methods
static <E> Transformer<Evaluation, E> castOrDie(Class<E> clazz)
Creates a transformer which will convert an Evaluation to a given type (or die trying).
static Atom<String> getCurrentUrl()
Returns the value of document.location.href.
static Atom<String> getTitle()
Returns the value of document.title.
static Atom<Evaluation> script(String script)
Creates an atom that will execute the provided script and return an evaluation object.
static <O> Atom<O> script(String script, Transformer<Evaluation, O> transformer)
Creates an atom that will execute the provided script and return an object created by the given transformer.
static Atom<Evaluation> scriptWithArgs(String script, List<? extends Object> args)
Creates an atom that will execute the provided script with the given non-contextual arguments.
static <I, O> Atom<O> transform(Atom<I> in, Transformer<I, O> transformer)
Creates an atom which wraps the input atom and transforms its output using the given transformer.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static Transformer<Evaluation, E> castOrDie (Class<E> clazz)

Creates a transformer which will convert an Evaluation to a given type (or die trying).

public static Atom<String> getCurrentUrl ()

Returns the value of document.location.href.

public static Atom<String> getTitle ()

Returns the value of document.title.

public static Atom<Evaluation> script (String script)

Creates an atom that will execute the provided script and return an evaluation object.

public static Atom<O> script (String script, Transformer<Evaluation, O> transformer)

Creates an atom that will execute the provided script and return an object created by the given transformer.

public static Atom<Evaluation> scriptWithArgs (String script, List<? extends Object> args)

Creates an atom that will execute the provided script with the given non-contextual arguments.

public static Atom<O> transform (Atom<I> in, Transformer<I, O> transformer)

Creates an atom which wraps the input atom and transforms its output using the given transformer.