Rayrun
← Back to Discord Forum

No intellisense in test file for page object class methods when using it via the fixture

I have a Playwright test suite in JS and I use POM via the fixture file to reduce the code in the test files. So having it this way I do not have any intellisense in VSCode in my test file for the methods and fields of my page object.

2023-07-15_23h16_23.png

This thread is trying to answer question "Is there a workaround to get intellisense in VSCode for the methods and fields of my page object when using Playwright test suite in JavaScript and POM via the fixture file?"

4 replies

Have you created the fixtures like this: https://playwright.dev/docs/test-fixtures#creating-a-fixture ? With homePage: HomePage in MyFixtures?

I am using JavaScript so can not specify types . Is there any workaround for this?

Ya it is called Typescript? Exactly for this reason?

Ok but maybe this could be done with JSdoc annotations? I have not figured out the exact way, so any help is appreciated 🙂

Related Discord Threads

TwitterGitHubLinkedIn
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.