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

winium.elements.desktop.ListBox Maven / Gradle / Ivy

Go to download

With the help of Winium.Elements you could simplify interaction with such complex elements like DataGrid, ComboBox, Menu and etc.

The newest version!
package winium.elements.desktop;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.RemoteWebElement;
import winium.elements.desktop.extensions.ByExtensions;

import java.util.HashMap;

public class ListBox extends DesktopElement {
    static final String SCROLL_TO_LIST_BOX_ITEM = "scrollToListBoxItem";

    public ListBox(WebElement element) {
        super(element);
    }

    public RemoteWebElement scrollTo(By by) {
        HashMap parameters = new HashMap();
        parameters.put("id", this.getId());
        parameters.put("using", ByExtensions.getStrategy(by));
        parameters.put("value", ByExtensions.getValue(by));
        return this.createRemoteWebElementFromResponse(this.execute(SCROLL_TO_LIST_BOX_ITEM, parameters));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy