Online Training: Web test automation with CodeceptJS. Sign up now!

autoLogin - general

I try to use the autoLogin plugin inside my test but I only get
Could not load plugin autoLogin from module ‘:/plugin/autoLogin’: Cannot convert undefined or null to object

Do I have to download the or install the plugin?

did you follow this tutorial here: https://codecept.io/plugins#autologin or check if you use the proper codeceptjs version?

I have installed codeceptjs on Monday, so I assume that the the version is ok. I used the sample page. But as you see the message looks like that something is missing. I am lost in this case, because if something is missed it have to be installed. But I cannot read anything about installing a plugin.

please provide your debug log, it’s better to sort things out!

The only output I can provide is:

Could not load plugin autoLogin from module ‘./plugin/autoLogin’:
Cannot convert undefined or null to object

Error:
at createPlugins (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/codeceptjs/lib/container.js:228:13)
at Function.create (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/codeceptjs/lib/container.js:36:25)
at Codecept.init (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/codeceptjs/lib/codecept.js:55:15)
at Command.module.exports (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/codeceptjs/lib/command/run.js:33:14)
at Command.listener (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/commander/index.js:315:8)
at Command.emit (events.js:196:13)
at Command.parseArgs (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/commander/index.js:651:12)
at Command.parse (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/commander/index.js:474:21)
at Object. (/usr/lib/node_modules/codeceptjs-webdriverio/node_modules/codeceptjs/bin/codecept.js:144:9)
at Module._compile (internal/modules/cjs/loader.js:759:30)

Is this what you need?

maybe there is a little full login test sample available to show how to right configure the test and the steps?

I am getting the same error
Could not load plugin autoLogin from module ‘./plugin/autoLogin’:
Cannot convert undefined or null to object

codeceptjs version 2.2.0

@vialy @peterngtr @Ognif

Probably your option saveToFile: true in autoLogin config,
And this way plugin saves user_session.json file with an undefined value, and that’s why framework can’t start.
I don’t know why, but the plugin saves cookies to this file right after the browser starts, and for this moment there aren’t any cookies.
I’m trying to use it with the puppeteer. And don’t know how to fix it. Probably the best solution to write login as step object by yourself for now

Lol, your should just remove fetch and restore options from config and everything runs perfect