Iam trying to automate the code using selenium puthon in pytest framework facing the Attribute error issue

Viewed 13

def setUserName(self, username):

  self.driver.find_element(By.ID, self.textbox_Username_ID).send_keys(username)

E AttributeError: 'NoneType' object has no attribute 'find_element'

AttributeError

1 Answers

You did not initialize driver object properly, currently it is not existing, 'NoneType' in Python

Related