In my application I need to enter multi-line data in one of the field. Using JSON file how can I pass the data in my protractor script?
var dataFile = require('../../../test-data/queues.json');
Inside the spec file you can access the same using dataFile.variableName.
To pass multi-line data you can separate the lines using \\n in json file. When you pass the data to your application via protractor it will be send as multi-line data.
Please let me know if you need any help regarding json structure.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.