Below is my code for my login page, I tried to make these
methods @staticmethod, I tried to do the same by adding the
@staticmethod syntax , but the problem is , after that i cant
access self.driver in the static method and could’nt find
the element for username and password , i am new to programming ,
any idea what are the necessary changes i should make?
class Login_page(): """Initiating class""""" def __init__(self, driver): self.driver = driver @staticmethod def Enter_username(self,username): self.driver.find_element_by_id("usernameId_new").send_keys(username) @staticmethod def Enter_password(self, password): self.driver.find_element_by_id("passwordId_new").send_keys(password) self.driver.implicitly_wait(20) @staticmethod def Click_submit(self): self.driver.find_element_by_tag_name("button").click()