Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token 'const' #64

Closed
mgifford opened this issue Oct 6, 2023 · 1 comment
Closed

Unexpected token 'const' #64

mgifford opened this issue Oct 6, 2023 · 1 comment

Comments

@mgifford
Copy link

mgifford commented Oct 6, 2023

Just trying to follow the usage model https://github.com/marmelab/greenframe-cli/tree/main#usage

in greenframe-cli/1.6.8 darwin-arm64 node-v16.20.1

I'm getting this error with % greenframe open https://marmelab.com ./my-scenario.js

Running 1 scenarios...
❌ Error : main scenario
Unexpected token 'const'

I'm just using the basic scenario provided % cat my-scenario.js                            

// in my-scenario.js
const scenario = async (page) => {
    await page.goto('', { waitUntil: 'networkidle' }); // Go to the baseUrl
    await page.waitForTimeout(3000); // Wait for 3 seconds
    await page.scrollToElement('footer'); // Scroll to the footer (if present)
    await page.waitForNetworkIdle(); // Wait every request has been answered as a normal user.
};

module.exports = scenario;
@erwanMarmelab
Copy link
Contributor

erwanMarmelab commented Oct 13, 2023

Hello,

Sorry for the confusion. The current README has been updated and corresponds to a future version of greenframe-cli which has not been released yet. The README has been updated and can now be found on the MAIN branch by doing a git pull. Here is the actual and official documentation website corresponding to the current released version :
https://docs.greenframe.io/scenario

Kind regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants