GabeGiro / EasyApplyJobsBot

Automated bot that applies to Linkedin jobs via Easy Apply based on your preferences
https://discord.gg/y9fC2snanK
MIT License
20 stars 6 forks source link

Fix finding the element #59

Closed GabeGiro closed 3 weeks ago

GabeGiro commented 1 month ago
2024-10-25 11:50:08 ❌ Error ❌ Unhandled exception in startApplying: Message: no such element: Unable to locate element: {"method":"xpath","selector":"html/body/div[3]/d
2024-10-25 11:50:08 Traceback (most recent call last):
2024-10-25 11:50:08   File "/app/EasyApplyJobsBot/linkedin.py", line 106, in startApplying
2024-10-25 11:50:08     jobCounter = self.processJob(jobID=job.linkedinJobId, jobCounter=jobCounter)
2024-10-25 11:50:08                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-25 11:50:08   File "/app/EasyApplyJobsBot/linkedin.py", line 155, in processJob
2024-10-25 11:50:08     jobCounter = self.handleJobPost(
2024-10-25 11:50:08                  ^^^^^^^^^^^^^^^^^^^
2024-10-25 11:50:08   File "/app/EasyApplyJobsBot/linkedin.py", line 251, in handleJobPost
2024-10-25 11:50:08     jobCounter = self.handleMultiplePages(jobPage, jobProperties, jobCounter)
2024-10-25 11:50:08                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-25 11:50:08   File "/app/EasyApplyJobsBot/linkedin.py", line 458, in handleMultiplePages
2024-10-25 11:50:08     comPercentage = self.driver.find_element(By.XPATH,'html/body/div[3]/div/div/div[2]/div/div/span').text
2024-10-25 11:50:08                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-25 11:50:08   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 748, in find_element
2024-10-25 11:50:08     return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
2024-10-25 11:50:08            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-25 11:50:08   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 354, in execute
2024-10-25 11:50:08     self.error_handler.check_response(response)
2024-10-25 11:50:08   File "/usr/local/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
2024-10-25 11:50:08     raise exception_class(message, screen, stacktrace)
2024-10-25 11:50:08 selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"html/body/div[3]/div/div/div[2]/div/div/span"}
2024-10-25 11:50:08   (Session info: chrome-headless-shell=124.0.6367.78); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception