UNPKG

@nice-digital/wdio-cucumber-steps

Version:

Shared step definitions for Cucumber JS BDD tests in WebdriverIO

18 lines 812 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.selectOptionByIndex = void 0; /*! https://github.com/webdriverio/cucumber-boilerplate/blob/master/src/support/action/selectOptionByIndex.js */ /** * Select a option from a select element by it's index * @param {String} index The index of the option * @param {String} obsolete The ordinal indicator of the index (unused) * @param {String} selector Element selector * * @todo merge with selectOption */ async function selectOptionByIndex(index, _obsolete, selector) { const optionIndex = parseInt(index, 10), element = await $(selector); await element.selectByIndex(optionIndex); } exports.selectOptionByIndex = selectOptionByIndex; //# sourceMappingURL=selectOptionByIndex.js.map