But you don't need to pass page in every function of a class. Instead you can pass the page object from test class while creating the object of the class.
const searchPage = new SearchPage(page)
This will work.
But you don't need to pass page in every function of a class. Instead you can pass the page object from test class while creating the object of the class.
const searchPage = new SearchPage(page)
This will work.