Nightwatch: .elementIdElements() is broken

Created on 19 Sep 2017  路  2Comments  路  Source: nightwatchjs/nightwatch

Using nightwatch 0.9.16
node v8.4.0
Selenium 3.4.0
MacOs 10.12.6

I have a function that goes through a table and logs the first cell of every row in the table.

getTableRowByFirstRowName: function(schoolName){
        let api = this.api;
        api.elements('xpath','//tbody/tr',function (rows) {
            rows.value.forEach(function(row){
                api.elementIdElements(row.ELEMENT,function (cells) {
                    api.elementIdText(cells[0].ELEMENT,function (firstCellName) {
                        console.log(firstCellName.value);                        
                    });
                });
            });
       });
    },

my program errors out on the .elementIdElements and returns this error

Error while running elementIdElements command: using.toLocaleLowerCase is not a function
    at /Users/scott.price/git/state-summary-frontend/e2e/page/overview.js:26:21
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/scott.price/git/state-summary-frontend/e2e/page/overview.js:25:24)
    at HttpRequest.<anonymous> (/usr/local/lib/node_modules/nightwatch/lib/index.js:366:18)
    at emitTwo (events.js:125:13)
    at HttpRequest.emit (events.js:213:7)
    at HttpRequest.<anonymous> (/usr/local/lib/node_modules/nightwatch/lib/index.js:382:15)
    at emitThree (events.js:135:13)
    at HttpRequest.emit (events.js:216:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/nightwatch/lib/http/request.js:166:16)

When i drill into the .elementIdElements using = using.toLocaleLowerCase(); is the 3rd line of the function that i think is the problem.

Most helpful comment

Can you share what you did @devastadus? Seeing the same error

All 2 comments

im a dork it works

Can you share what you did @devastadus? Seeing the same error

Was this page helpful?
0 / 5 - 0 ratings