question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

` TypeError: this.resultValue.indexOf is not a function`

See original GitHub issue

I keep getting this error at:

search.waitForElementVisible('@headerTitle', client.globals.waitForTiming);
search.expect.element('@headerTitle').text.to.contain('Miami');

Error:

 TypeError: this.resultValue.indexOf is not a function
    at TextAssertion.<anonymous> (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/api/expect/_baseAssertion.js:218:48)
    at TextAssertion.BaseAssertion.getResult (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/api/expect/_baseAssertion.js:182:19)
    at TextAssertion.BaseAssertion.conditionFlag (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/api/expect/_baseAssertion.js:258:22)
    at TextAssertion.BaseAssertion.@containsFlag (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/api/expect/_baseAssertion.js:217:8)
    at TextAssertion.<anonymous> (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/api/expect/_baseAssertion.js:144:33)
    at Array.forEach (native)
    at TextAssertion.BaseAssertion.processFlags (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/api/expect/_baseAssertion.js:140:30)
    at TextAssertion.<anonymous> (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/api/expect/_baseAssertion.js:112:10)
    at HttpRequest.<anonymous> (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/index.js:339:20)
    at emitTwo (events.js:100:13)
    at HttpRequest.emit (events.js:185:7)
    at HttpRequest.<anonymous> (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/index.js:378:15)
    at emitThree (events.js:110:13)
    at HttpRequest.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/home/travis/build/gadabout/sparrow/node_modules/nightwatch/lib/http/request.js:157:16)
    at emitNone (events.js:85:20)
    at IncomingMessage.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:906:12)
    at nextTickCallbackWith2Args (node.js:475:9)
    at process._tickDomainCallback (node.js:430:17)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
hon2acommented, Jun 8, 2017

Me too. Never on the local machine, but in exactly the same circumstances when running on a CI server. (The error appears when repeatedly using an element(...).text.to.contain(...) test.)

0reactions
stale[bot]commented, Nov 14, 2018

This issue has been automatically marked as stale because it has not had any recent activity. If possible, please retry using the latest Nightwatch version and update the issue with any relevant details. If no further activity occurs, it will be closed. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: .indexOf is not a function - Stack Overflow
2. It is indeed a function - of a valid object - meaning time isn't a valid object. Make sure time exists, log...
Read more >
TypeError: indexOf is not a function in JavaScript | bobbyhadz
The "indexOf is not a function" error occurs when the indexOf() method is called on a value that is not of type string...
Read more >
TypeScript: how to resolve error 'indexOf is not a function'
Sometime on TypeScript, when you call the indexOf() method you can get the error 'indexOf is not a function'. This happens when the...
Read more >
"TypeError: value.indexOf is not a function" thrown when ...
When using g_form.setValue() to change the value for a Currency field and error message is thrown in the browser console with the following...
Read more >
Lodash Documentation
Creates an array of array values not included in the other given arrays using ... This method is like _.find except that it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found