mercredi 31 janvier 2018

get values out from elements webdriver with Nightwatch/Selenium

I need to be able to get the values out of elements using nightwatch, but I cannot seem to do it at all

module.exports = {
  tags: ['someTest'],
  'Test login': function (browser) {
       browser
      .elements('css selector', '.react-grid-Header .react-grid-HeaderCell-sortable', (items) => {
        items.value.forEach(item => {
          item //{...}
          item.ELEMENT //123123123.12 (an id of some sort)?
          console.info(driver.findElement(By.id(item.ELEMENT))); //driver is undefined
        });
      })
    }
}

Aucun commentaire:

Enregistrer un commentaire