Question TypeError: __init __ () takes 1 positional argument but 2 were given solutions

When setting up the automation framework, encountered a problem, as shown below:

According to the meaning of the error, should be the __init__ function, the position should be HomePage file
immediately went to look at the file, as shown:

The original is because of carelessness __init __ (self) passing a few parameters driver
later still have to carefully point

Solution:
DEF the init (Self, driver): you can add parameters driver

Guess you like

Origin www.cnblogs.com/lxc1997ye/p/11665439.html