The element/elements command returns different structures for the selenium element between nightwatch and nightwatch-api and you can no longer use them to there full potential
Expected Behavior
Nightwatch object returned
{
"ELEMENT": "0.26693227503345773-1"
}
Current Behavior
Nightwatch-api object example
{
"element-6066-11e4-a52e-4f735466cecf": "f5ae481e-4855-4343-a0f6-00553f97b534"
}
Steps to Reproduce (for bugs)
Example code:
client -> nightwatch-api import
await client.url("https://nightwatchjs.org/guide");
await client.elements("css selector", "a", function (res) {
res.value.forEach(function (jsonWebElement) {
let jsonWebElementId = jsonWebElement.ELEMENT;
client.elementIdText(jsonWebElementId, function (jsonElement) {
let text = jsonElement.value;
console.log("link text " + text);
});
});
});
Because there no longer is an ELEMENT property you can read to get the id to use further protocol actions based on that like elementIdText can no longer be used
Your Environment
- Version used: ^3.0.1
- Browser Name and version: Firefox 72.0.1
- Operating System and version (desktop or mobile): Windows 10
- using nightwatch api in a mocha setup
The element/elements command returns different structures for the selenium element between nightwatch and nightwatch-api and you can no longer use them to there full potential
Expected Behavior
Nightwatch object returned
{
"ELEMENT": "0.26693227503345773-1"
}
Current Behavior
Nightwatch-api object example
{
"element-6066-11e4-a52e-4f735466cecf": "f5ae481e-4855-4343-a0f6-00553f97b534"
}
Steps to Reproduce (for bugs)
Example code:
client -> nightwatch-api import
Because there no longer is an ELEMENT property you can read to get the id to use further protocol actions based on that like elementIdText can no longer be used
Your Environment