Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Iterate through array of elements



Quick sample script to iterate through an array for elements returned by findElements

var getData = function (element) {
  return console.log(text);

  // Switch to iFrame
  // get elements of array
  return $browser.findElements($driver.By.xpath('/html/body/table/tbody/*/*')).then(function(elements){
  // iterate through array calling getData for each one 

$browser.findelement in a loop