Open notSoTechnical opened 1 year ago
I'm getting the same & here's the error I'm getting ðŸ˜
/usr/local/bin/python3.9 /Users/Admin/Downloads/EasyApply-Linkedin-master/main.py
Traceback (most recent call last):
File "/Users/Admin/Downloads/EasyApply-Linkedin-master/main.py", line 180, in <module>
bot.apply()
File "/Users/Admin/Downloads/EasyApply-Linkedin-master/main.py", line 163, in apply
self.login_linkedin()
File "/Users/Admin/Downloads/EasyApply-Linkedin-master/main.py", line 31, in login_linkedin
login_email = self.driver.find_element_by_name('session_key')
AttributeError: 'WebDriver' object has no attribute 'find_element_by_name'
/usr/local/bin/python3.9 /Users/Admin/Downloads/EasyApply-Linkedin-master/main.py Traceback (most recent call last): File "/Users/Admin/Downloads/EasyApply-Linkedin-master/main.py", line 180, in
bot.apply() File "/Users/Admin/Downloads/EasyApply-Linkedin-master/main.py", line 163, in apply self.login_linkedin() File "/Users/Admin/Downloads/EasyApply-Linkedin-master/main.py", line 31, in login_linkedin login_email = self.driver.find_element_by_name('session_key') AttributeError: 'WebDriver' object has no attribute 'find_element_by_name'
you need to add credentials in config file
I was also getting the same error. On searching for a quick fix, found that 'By' function along with supported attributes worked fine. Adding the code snippets and link to official selenium docs below.
from selenium.webdriver.common.by import By
The attributes available for the By class are used to locate elements on a page. These are the attributes available for By class:
ID = "id"
NAME = "name"
XPATH = "xpath"
LINK_TEXT = "link text"
PARTIAL_LINK_TEXT = "partial link text"
TAG_NAME = "tag name"
CLASS_NAME = "class name"
CSS_SELECTOR = "css selector"
The ‘By’ class is used to specify which attribute is used to locate elements on a page. These are the various ways the attributes are used to locate elements on a page:
find_element(By.ID, "id")
find_element(By.NAME, "name")
find_element(By.XPATH, "xpath")
find_element(By.LINK_TEXT, "link text")
find_element(By.PARTIAL_LINK_TEXT, "partial link text")
find_element(By.TAG_NAME, "tag name")
find_element(By.CLASS_NAME, "class name")
find_element(By.CSS_SELECTOR, "css selector")
Crashed after running the program