playwright-fluent
Version:
Fluent API around playwright
15 lines (14 loc) • 688 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasSelectorExactValue = void 0;
const get_handle_of_1 = require("../get-handle-of");
const handle_actions_1 = require("../../handle-actions");
async function hasSelectorExactValue(selector, expectedValue, page, options) {
if (!page) {
throw new Error(`Cannot check exact value of '${selector}' because no browser has been launched`);
}
const handle = await (0, get_handle_of_1.getHandleOf)(selector, page, options);
const result = await (0, handle_actions_1.hasHandleExactValue)(handle, expectedValue);
return result;
}
exports.hasSelectorExactValue = hasSelectorExactValue;
;