"use strict";
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Object.defineProperty(exports, "__esModule", { value: true });
exports.setCustomOrientation = setCustomOrientation;
exports.getInputFieldValue = getInputFieldValue;
exports.getOrientationInputs = getOrientationInputs;
exports.getOrientationValues = getOrientationValues;
const helper_js_1 = require("../../shared/helper.js");
async function setCustomOrientation(devtoolsPage) {
    const dropDown = await devtoolsPage.waitFor('.orientation-fields select');
    void (0, helper_js_1.selectOption)(await dropDown.toElement('select'), 'custom');
}
async function getInputFieldValue(field) {
    return await field.evaluate(input => input.value);
}
async function getOrientationInputs(devtoolsPage) {
    return await devtoolsPage.waitForMany('.orientation-axis-input-container input', 3);
}
async function getOrientationValues(devtoolsPage) {
    return await Promise.all((await getOrientationInputs(devtoolsPage)).map(i => i.evaluate(i => parseInt(i.value, 10))));
}
//# sourceMappingURL=helpers.js.map