Problem typeerror:__ init__() Take 1 positive argument but 2 were given solution

When building the automation framework, I encountered a problem, as shown in the following figure:

According to the meaning of the error, it should be the problem of the __init__ function, and the location should be the HomePage file.
Go and check the file immediately, as shown in the figure:

It turned out to be careless __init__ (self)
after passing in one less parameter driver , you still have to be careful

Solution:
def init (self, driver): just add the parameter driver

 

Similar Posts: