Get value from an input element
I.getValue
Get the value of an input element
Usage
I.getValue(target)
Parameters
Parameter | Type | Remarks |
---|---|---|
target | string | Keyword to identify the field. |
Example(s)
I.fill("Search", "Hello")
I.type(" from the other side")
var foo = I.getValue("Search") // `foo` would be "Hello from the other side"
In this example, we first fill "Hello" to the "Search" field, and continue typing " from the other side" into the field which is currently in focus. You can get the value of the "Search" field using I.getValue
and store the value into a variable for later use.