Using JSON values as functions arguments
Open
- Dominant language
- JavaScript
- Stars
- 7.2k
- Forks
- 621
- PR merge metrics
- No merged PRs in 30d
Description
It is possible to use some of backstop.json values as arguments in puppeteer functions?
For example:
"label": "Sign Confirmation",
"url": "URL.COM",
"referenceUrl": "HOM.URL.COM",
"onReadyScript": "puppet/custom/sign-confirmation.js",
"delay": 0,
"hideSelectors": [],
"selectorExpansion": true,
"misMatchThreshold" : 0.5,
"requireSameDimensions": true
> puppet/custom/sign-confirmation.js
```
module.exports = async (page) => {
await login(page)
await page.goto(referenceUrl + \SIGNCONFIRMATION)
};
```
Contributor guide
Assessment
This issue has not been assessed yet.