Not able to Assign world variable in constructor #2242
Unanswered
prince-inbaraj-sky
asked this question in
Q&A JavaScript
Replies: 1 comment
-
Can you elaborate on this part - what is the code that is trying to interact with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to print logs with current page name , PFB for code in customworld class
info(logMessage) {
let message = [${this.formatDate(new Date())}] [INFO] ${logMessage};
this.attach(
JSON.stringify({
level: "INFO",
message: message,
}),
'text/plain',
);
logger.info(logMessage);
}
when I tried to assign world value in constructor page class getting below error
Error: Attempted to access world from incorrect scope; only applicable to steps and case-level hooks
Beta Was this translation helpful? Give feedback.
All reactions