# ElementReference

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#)  

# ElementReference

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
ElementReference
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


implements

`[JSONAble](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble)`


`

|---|----------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.web.model.ElementReference |

<br />

*** ** * ** ***

A reference to a javascript element existing within a WebView.

This reference is only a pointer to data held within the javascript context of a given WebView. It may no longer be valid the next time you attempt to use it. For instance the page could be navigated away from. There is not much you can use an ElementReference for in Java, it exists primarily to pass back to a WebView for further action.

## Summary

|                                                                                                                                           ### Public methods                                                                                                                                           ||
|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` boolean`                                                                 | ` `[equals](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object.html)` other) ` |
| ` int`                                                                     | ` `[hashCode](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#hashCode())`() `                                                                                            |
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[toJSONString](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#toJSONString())`() `                                                                                    |
| ` `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[toString](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#toString())`() `                                                                                            |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference#)From interface` `[android.support.test.espresso.web.model.JSONAble](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble)` ` |-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[String](https://developer.android.com/reference/java/lang/String.html) | ` `[toJSONString](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble#toJSONString())`() ` | ||

## Public methods

### equals

```
boolean equals (Object other)
```

<br />

<br />

|        Parameters        ||
|---------|-----------------|
| `other` | `Object` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### hashCode

```
int hashCode ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### toJSONString

```
String toJSONString ()
```

<br />

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

### toString

```
String toString ()
```

<br />

<br />

|                                     Returns                                     ||
|-------------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String.html) | <br /> |

-

  ## Interfaces

  - [Atom](https://developer.android.com/reference/android/support/test/espresso/web/model/Atom)
  - [JSONAble](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble)
  - [JSONAble.DeJSONFactory](https://developer.android.com/reference/android/support/test/espresso/web/model/JSONAble.DeJSONFactory)
  - [TransformingAtom.Transformer](https://developer.android.com/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer)
-

  ## Classes

  - [Atoms](https://developer.android.com/reference/android/support/test/espresso/web/model/Atoms)
  - [ElementReference](https://developer.android.com/reference/android/support/test/espresso/web/model/ElementReference)
  - [Evaluation](https://developer.android.com/reference/android/support/test/espresso/web/model/Evaluation)
  - [ModelCodec](https://developer.android.com/reference/android/support/test/espresso/web/model/ModelCodec)
  - [SimpleAtom](https://developer.android.com/reference/android/support/test/espresso/web/model/SimpleAtom)
  - [TransformingAtom](https://developer.android.com/reference/android/support/test/espresso/web/model/TransformingAtom)
  - [WindowReference](https://developer.android.com/reference/android/support/test/espresso/web/model/WindowReference)
-

  ## Enums

  - [SimpleAtom.ElementReferencePlacement](https://developer.android.com/reference/android/support/test/espresso/web/model/SimpleAtom.ElementReferencePlacement)