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

winium.elements.desktop.Menu 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.remote.RemoteWebElement;

import java.util.HashMap;

public class Menu extends DesktopElement {
    static final String FIND_MENU_ITEM = "findMenuItem";
    static final String SELECT_MENU_ITEM = "selectMenuItem";

    private RemoteWebElement callMenuItemCommand(String command, String path) {
        HashMap parameters = new HashMap();
        parameters.put("id", this.getId());
        parameters.put("path", path);
        return this.createRemoteWebElementFromResponse(this.execute(command, parameters));

    }

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

    public RemoteWebElement findItem(String path) {
        return this.callMenuItemCommand(FIND_MENU_ITEM, path);
    }

    public RemoteWebElement selectItem(String path) {
        return this.callMenuItemCommand(SELECT_MENU_ITEM, path);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy