[Wrapped Error] "Cannot read property 'findAndStoreElements' of undefined"
See original GitHub issueWhat are you trying to achieve?
I am trying to fill an input field with some text
What do you get instead?
[Wrapped Error] “Cannot read property ‘findAndStoreElements’ of undefined”
Provide console output if related. Use
--verbose
mode for more details.
• I fill field "_username", "user144001"
[1] Error | Cannot read property 'findAndStoreElements' of undefined
Emitted | step.failed (I fill field "_username", "user144001")
Step finished in 1.929 sec
[1] Error | Error: [Wrapped Error] "Cannot read property 'findAndStoreElements' of undefined"
[1] Starting <teardown> session
Emitted | test.failed ([object Object])
[1] <teardown> Queued | hook Nightmare._failed()
[1] <teardown> Queued | hook Util._failed()
[1] <teardown> Queued | () => done(err)
[1] <teardown> Stopping recording promises
Error: [Wrapped Error] "Cannot read property 'findAndStoreElements' of undefined"
at promise.catch (/Users/Dragos/Documents/codeceptjs-tests/node_modules/codeceptjs/lib/recorder.js:135:15)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Provide test source code if related
I.fillField('_username', 'username');
Details
- CodeceptJS version: v1.1.1
- NodeJS Version: v9.0.0
- Operating System: macOS Sierra
- Nightmare version: v2.10.0
- Configuration file:
helpers: {
Nightmare: {
url: ...,
show: true,
restart: true,
typeInterval: 30,
smartWait: 5000,
switches: {
'ignore-certificate-errors': true
}
}
},
If this is strictly a Nightmare related issue(and not a codeceptjs one) I will re-create this ticket in the proper repo.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >Uncaught TypeError: Cannot read property 'wrap' of undefined
It looks like 'myCarousel.carousel.attributes.wrap' is undefined. Uncaught TypeError: Cannot read property 'wrap' of undefined at Object.
Read more >Why getting cannot read properties of undefined error?
users is the array of users Im getting from the API. However I am getting the error: Cannot read properties of null (reading...
Read more >Uncaught TypeError : Cannot read properties of undefined
Looking for ways to handle Uncaught TypeError: Cannot read property of undefined in JavaScript? This guide will help you to catch errors.
Read more >How to Prevent the TypeError: Cannot Read Property Map of ...
A guide on the root cause of 'cannot read map of undefined' as well as techniques and tools to prevent this error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@reubenmiller thanks a lot. it works for me now with the retry step. 👍 hopefully it will be a solution for the others here too
If anyone else runs into this, I fixed it by adjusting the helper to use
const I = inject();
at the beginning instead of settingI
in the_init()
function within the object. Also needed to update Codecept version as I guess_init()
was deprecated and replaced withinject()
.