TimeField
Summary
Defines a form time field.
Use Field.get method to get an instance of TimeField.
Constructor
TimeField
Syntax
TimeField
-
conf
Summary
Parameters:
-
conf
ObjectA field configuration object
Example:
var Field = require('@openveo/test').e2e.fields.Field;
var TimeField = Field.get({
type: 'time',
name: 'My time field',
baseElement: element(by.css('form'))
});
Item Index
Methods
Properties
Methods
clear
Syntax
Summary
Clears field value.
Returns:
Promise resolving when the field is cleared
Example:
myField.clear().then(function() {
console.log('Field cleared');
});
getDescription
Syntax
Summary
Gets field description.
Returns:
Promise resolving with the description
Example:
myField.getDescription().then(function(description) {
console.log('Field description is : ' + description);
});
getElement
Syntax
Summary
Gets field element wrapper.
Look for a form element label and return its parent.
Returns:
Promise resolving with the element
getErrorMessage
Syntax
Summary
Gets field error message.
Returns:
Promise resolving with the error message
Example:
myField.getErrorMessage().then(function(errorMessage) {
console.log('Error message : ' + errorMessage);
});
getLabel
Syntax
Summary
Gets field label.
Returns:
Promise resolving with the label
Example:
myField.getLabel().then(function(label) {
console.log('Field label is : ' + label);
});
getText
Syntax
Summary
Gets field text representation in case of an inline editable field.
Returns:
Promise resolving with field text representation
Example:
myField.getText().then(function(text) {
console.log(text);
});
getValue
Syntax
Summary
Gets field value.
Returns:
Promise resolving with field value
Example:
myField.getValue().then(function(value) {
console.log('Got value : ' + value);
});
isOnError
Syntax
Summary
Tests if a field is considered as on error.
Returns:
Promise resolving with a boolean indicating if the field is on error
Example:
myField.isOnError().then(function(isOnError) {
console.log('Is field on error ? ' + isOnError);
});
setValue
Syntax
Summary
Sets field value.
Actually it's not possible to use the Web Driver to set the value of the input in time state. Until this feature is added to the Web Driver, value of the input is set programmatically. Be careful events on the input won't be dispatched (change, click and so on).
Parameters:
-
[value='00:00:00']
String optionalField's value format as hh:mm:ss
Returns:
Promise resolving when the field is filled
Example:
myField.setValue('new value').then(function() {
console.log('Value set');
});
Properties
baseElement
Syntax
baseElement
ElementFinder
final
Summary
Element from where to look for the field (typically the form element).