org.fluentlenium.core.action.Fill Maven / Gradle / Ivy
package org.fluentlenium.core.action;
import org.fluentlenium.core.domain.FluentList;
import org.fluentlenium.core.domain.FluentWebElement;
/**
* Default form filling features.
*
* Documentation can also be found at the FluentLenium website at
* Locators / Filling Forms.
*
* @param type of elements to fill
*/
public class Fill extends BaseFill {
/**
* Creates a new fill from a list of elements.
*
* @param list list of elements to fill
*/
public Fill(FluentList list) {
super(list);
}
/**
* Creates a new fill from a single element.
*
* @param element element to fill
*/
public Fill(E element) {
super(element);
}
/**
* Fills the underlying elements with the provided texts.
*
* @param textValues value to search
* @return this Fill instance
* @see FluentList#write(String...)
* @see FluentWebElement#write(String...)
*/
public Fill with(String... textValues) {
getElements().write(textValues);
return this;
}
/**
* Fills the underlying elements with the provided texts.
*
* Synonym for {@link #with(String...)}.
*
* @param textValues value to search
* @return this Fill instance
*/
public Fill withText(String... textValues) {
return with(textValues);
}
}