Rayrun
← Back to Discord Forum

'HomePage' object has no attrebute 'page'

Hi. I followed directions from official documentation and udemy course but for some reason I face 2 annoying issues. First one is in the name of this topic and it occurs when i run the test (HomePage is just a POM for home page) and seccond one is when i set homepage = HomePage(page) i get HomePage() takes no argument. Please help me fix this, everything looks correct, im desperate

This thread is trying to answer question "How can the user fix the 'HomePage' object attribute and argument issues when running a test?"

2 replies

Can you post the entire code snippet?

insanerookstar
insanerookstar

Did you forget about 'new'? const homePage = new HomePage(page)

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.