I'm not sure if you could figure it out or not. however, I was able to do just that.
Here is what your json might look like:
[ { "someId": "signInInput", "sendSomeKeys": " j@j.com " }, { "someId": "passwordInput", "sendSomeKeys": "password" } ]
And here's how to implement it in your test:
'use strict'; var testData = require('./path/to/json.json'); describe('your test', function() { testData.forEach( function (data) { it('should read from an external json', function(){ element(by.id(data.someId)).sendKeys(data.sendSomeKeys); }); }); });
source share