Closed jdelbarcogarza-softtek closed 10 months ago
Update: when the file is extracted from the project's folder, memlab works. But should memlab be able to run code inside the project's codebase?
The scenario file doesn't define page
function parameter for action
and back
, not sure why it works when it is outside the project's codebase
same issue.
Do not forget about the page
parameter in the scenario definition.
module.exports = {
url: ...
// do not forget about the `page` parameter here
action: async (page) => { ... }
// same
back: async (page) => { ... }
}
Do not forget about the
page
parameter in the scenario definition.module.exports = { url: ... // do not forget about the `page` parameter here action: async (page) => { ... } // same back: async (page) => { ... } }
OP's code has forgotten the page
parameter, but this will not solve the issue.
@mrdulin To help understand and investigate the issue, can you share the steps to reproduce the issue you got? E.g., what the scenario file looked like, how you run the scenario file, and the error message.
I was also facing the same issue. By removing the "type": "module"
from package.json
in npm package containing scenario.js
to run and re-running memlab, the issue was resolved.
Alternatively, the issue can also be resolved by renaming scenario.js
to scenario.cjs
.
`Hello, I'm trying to test memlab for a project. While following the tutorial it worked, but now when trying to run a scenario in my project. The error
Invalid scenario file: .\tests\test.jscomes up. Context: I placed the
scenario.jsfile inside
/src/test` folders.Here is my scenario:
Could someone put me in the right direction here on how to get memlab up and running?