Skip to main content
added 9 characters in body
Source Link
IAmMilinPatel
  • 7.8k
  • 7
  • 43
  • 68

But you dntdon'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). thisconst searchPage = new SearchPage(page)

This will work.

But you dnt 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.

Source Link

But you dnt 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