cypress-cucumber-steps
Version:
Cypress Cucumber step definitions
43 lines • 1.32 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.When_I_find_element_by_selector = When_I_find_element_by_selector;
var cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor");
var utils_1 = require("../utils");
/**
* When I find element by selector:
*
* ```gherkin
* When I find element by selector {string}
* ```
*
* Get the descendent DOM elements of a specific selector.
*
* The querying behavior of this command matches exactly how [`.find()`](https://api.jquery.com/find/) works in jQuery.
*
* @example
*
* Find the element with the class `banner`:
*
* ```gherkin
* When I find element by selector ".banner"
* ```
*
* @remarks
*
* A preceding step like {@link When_I_find_form | "When I find form"} is required. For example:
*
* ```gherkin
* When I find form
* And I find element by selector "input[type='checkbox']"
* And I click
* ```
*
* @see
*
* - {@link When_I_get_element_by_selector | When I get element by selector}
*/
function When_I_find_element_by_selector(selector) {
(0, utils_1.setCypressElement)((0, utils_1.getCypressElement)().find(selector));
}
(0, cypress_cucumber_preprocessor_1.When)('I find element by selector {string}', When_I_find_element_by_selector);
//# sourceMappingURL=find.js.map