"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OjButton = void 0;
const selenium_webdriver_1 = require("selenium-webdriver");
const OjButtonBase_1 = require("./OjButtonBase");
/**
 * The component WebElement for [oj-button](../../jsdocs/oj.ojButton.html).
 * Do not instantiate this class directly, instead, use
 * [ojButton](../functions/elements.ojButton-1.html).
 */
class OjButton extends OjButtonBase_1.OjButtonBase {
    /**
     * Perform a click on the button
     */
    doAction() {
        return this.click();
    }
    /**
     * Perform a context-click on the button
     */
    async doContextClick() {
        let button = await this.findElement(selenium_webdriver_1.By.css('button'));
        await button.sendKeys(selenium_webdriver_1.Key.SHIFT, selenium_webdriver_1.Key.F10);
    }
    /**
     * Perform a click on the button
     */
    async click() {
        // Find the <button> element to click so that it can receive focus
        const button = await this.findElement(selenium_webdriver_1.By.css('button'));
        return button.click();
    }
}
exports.OjButton = OjButton;
//# sourceMappingURL=OjButton.js.map