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

FlaNium.WinAPI.elements.Menu Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package FlaNium.WinAPI.elements;

import FlaNium.WinAPI.DesktopElement;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.Response;

import java.util.List;
import java.util.stream.Collectors;

public class Menu extends DesktopElement {

    private static final String MENU_ITEMS = "menuItems";

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

    /**
     * Gets all MenuItem which are inside this element.
     * @return
     */
    public List items() {
        Response response = callVoidCommand(MENU_ITEMS);
        return createRemoteWebElementsFromResponse(response)
                .stream()
                .map(MenuItem::new)
                .collect(Collectors.toList());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy