UNPKG

browser-actions

Version:

Implementing Re-Usable Browser Actions For Cypress

8 lines (7 loc) 198 B
Cypress.Commands.add("stringToJsonPath", (locString, locators) => { let jsonPath; locString.split(".").forEach(function (key) { jsonPath = locators[key]; }); return jsonPath; });