<commit_before>package io.rappid.webtest.rappidjs.js.ui;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

/**
 * User: tony
 * Date: 20.10.13
 * Time: 18:38
 */
public class MenuButton extends View {
    public MenuButton(By by) {
        super(by);
    }

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

    public String getLabel() {
        return getChild("span:not(.caret)").getText();
    }
}<commit_msg>filled menubutton with live<commit_after>package io.rappid.webtest.rappidjs.js.ui;

import io.rappid.webtest.common.WebElementPanel;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

/**
 * User: tony
 * Date: 20.10.13
 * Time: 18:38
 */
public class MenuButton extends Button {
    public MenuButton(By by) {
        super(by);
    }

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

    public Button button() {
        return getChildPanel(".btn", Button.class);
    }

    public WebElementPanel menu() {
        return getChildPanel(".dropdown-menu", WebElementPanel.class);
    }

    public String getLabel() {
        return getChild("span:not(.caret)").getText();
    }

    public boolean menuIsOpened() {
        return hasClass("open");
    }

    public boolean menuIsClosed() {
        return !menuIsOpened();
    }
}
{'fraction_non_alphanumeric': 0.12929745889387145, 'fraction_numerical': 0.014947683109118086, 'mean_word_length': 2.9037900874635567, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3314524', 'n_tokens_mistral': 458, 'n_tokens_neox': 427, 'n_words': 87}