Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashed after chrome was loaded #11

Open
notSoTechnical opened this issue Nov 22, 2022 · 3 comments
Open

crashed after chrome was loaded #11

notSoTechnical opened this issue Nov 22, 2022 · 3 comments

Comments

@notSoTechnical
Copy link

Crashed after running the program

@Wilson-D-Lee
Copy link

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'

@nandlalyadav57
Copy link

/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

@ace97
Copy link

ace97 commented Oct 17, 2023

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.

Locating Elements using BY

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants