title: Get attribute or elements from page by script in nightwatch
body: <p>I need a check that class elements was ui-state-active.</p>
  
  <pre><code>class="ui-state-default ui-state-active" href="#"&gt;15&lt;/a&gt;
  </code></pre>
  
  <p>I am trying to using all methods and don't undestand how to write a code:</p>
  
  <pre><code>.perform(function () {
      var arrAttr = [];
      var arrCssProp = [];
      var arrValue= [];
      for (i = 1; i &lt; 8; i++) {
        for (j = 1; j &lt; 7; j++) {            
          browser.useXpath();
          browser.getCssProperty('//*[@id="ui-datepicker-div"]/table/tbody/tr[' + i + ']/td[' + j + ']', '.ui-state-default', function (result) {
            arrCssProp[j, i] = result.value;              
          });
          browser.getAttribute('//*[@id="ui-datepicker-div"]/table/tbody/tr[' + i + ']/td[' + j + ']', '.ui-state-default', function (result) {
            arrAttr[j, i] = result.value;
          });
          browser.getValue('//*[@id="ui-datepicker-div"]/table/tbody/tr[' + i + ']/td[' + j + ']', '.ui-state-default', function (result) {
            arrValue[j, i] = result.value;
          });
          browser.useCss();
          writeLogLine('arrAttr:' + i + "|" + j + ' :' + arrAttr);
          console.log('arrAttr:' + i + "|" + j + ' :' + arrAttr);
          writeLogLine('arrCssProp:' + i + "|" + j + ' :' + arrCssProp);
          console.log('arrCssProp:' + i + "|" + j + ' :' + arrCssProp);
          writeLogLine('arrValue:' + i + "|" + j + ' :' + arrValue);
          console.log('arrValue:' + i + "|" + j + ' :' + arrValue);
        }
      }
    })
  </code></pre>