← Back to Discord Forum

getting error with method imports when using grep

i have a solution where the login method is imported from the testfunctions.js file i call the login method from testfunctions.js file in main test script, when I run the script without using --grep and a tag the test script runs without any error but when I use the grep command i het the error that i cannot import the testfunctions.js file. I have attached the screen shot of the terminal . Please. help if anyone can tell what is the reason and fix for this


This thread is trying to answer question "Why am I getting an error when importing a method from a file in my test script when using the grep command?"

2 replies

@madmax.dx import like this

import { test, expect } from '@playwright/test'

thanks a lot

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.