All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fluentlenium.core.action.FillSelect Maven / Gradle / Ivy

package org.fluentlenium.core.action;

import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.support.ui.Select;

import org.fluentlenium.core.domain.FluentList;
import org.fluentlenium.core.domain.FluentWebElement;

import java.util.function.Consumer;

/**
 * Provides functionality to select values in {@code  elementSelector) {
        FluentList elements = getElements();

        if (elements.isEmpty()) {
            throw new NoSuchElementException("No select element found");
        }

        for (FluentWebElement element : elements) {
            Select select = new Select(element.getElement());
            elementSelector.accept(select);
        }

        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy