mercredi 26 février 2020

Nightwatch: .elements() returns different result for geckodriver

I'm using Nightwatch.js. Here's this piece of code:

.elements("css selector", ".inputField", (inputFields: any) => {
  console.log("input fields", inputFields);
})

Using chromedriver it prints:

{
  sessionId: '5d160b0b2808e96e181a67e347760c51',
  status: 0,
  value: [{
      ELEMENT: '0.31906899492724383-12'
    },
    {
      ELEMENT: '0.31906899492724383-13'
    },
  ]
}

But using geckodriver:

{
  value: [{
      'element-6066-11e4-a52e-4f735466cecf': 'f53da795-6871-4
    },
    {
      'element-6066-11e4-a52e-4f735466cecf': '38acacec-17ae-4
    },
  ]
}

What's the problem? The return type should be the same. I've tried to set w3c: false in chromeOptions but nothing changed.

Aucun commentaire:

Enregistrer un commentaire