The parameter of python function reports an error for no reason.

 self.proxyauth_plugin_path = self.create_proxyauth_extension(proxy_host="117.41.186.194",proxy_port="888",proxy_username="we41a",proxy_password="we41a",scheme="https",plugin_path=None)

         self.driver.add_extension(self.proxyauth_plugin_path)


         self.driver = webdriver.Chrome(options=options)

     def create_proxyauth_extension(proxy_host, proxy_port,
                                    proxy_username, proxy_password,
                                    scheme, plugin_path):
                                    
                                    
                      
                      
         

clipboard.png

67
Mar.18,2021
If a method inside a

class is not declared as a class method (@ classmethod), then its first parameter points to an instance of the class by default, which is equivalent to the usual self. It doesn't matter what the name of the first parameter is. The python interpreter automatically sets the first parameter to the instance itself. It doesn't mean that you don't pass in the instance of the class if you don't write self,python. So, when you call it, plus the 6 you give it, will the python interpreter pass a total of 7


parameters missing self?


def create_proxyauth_extension(self, 
                            proxy_host, proxy_port,
                            proxy_username, proxy_password,
                            scheme, plugin_path):
Menu