Skip to content

NoSuchElementException for label [for='follow-company-checkbox'] breaks runtime #113

@twitterduck

Description

@twitterduck

Steps to reproduce:
-Run the EasyApplyJobsBot following the non-docker steps
-Notice the runtime error that completely stops the program from running once it gets to the step where it attempts to check off the follow-company-checkbox

Terminal Dump:

(myenv) twitterduck@twitterduck-ThinkPad-T431s:~/EasyApplyJobsBot$ python3 runner.py
Traceback (most recent call last):
  File "/home/twitterduck/EasyApplyJobsBot/linkedin.py", line 101, in startApplying
    jobCounter = self.processJob(jobID=job.linkedinJobId, jobCounter=jobCounter)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/twitterduck/EasyApplyJobsBot/linkedin.py", line 150, in processJob
    jobCounter = self.handleJobPost(
                 ^^^^^^^^^^^^^^^^^^^
  File "/home/twitterduck/EasyApplyJobsBot/linkedin.py", line 252, in handleJobPost
    jobCounter = self.handleMultiplePages(jobPage, jobProperties, jobCounter)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/twitterduck/EasyApplyJobsBot/linkedin.py", line 436, in handleMultiplePages
    jobCounter = self.handleSubmitPage(jobPage, jobProperties, jobCounter)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/twitterduck/EasyApplyJobsBot/linkedin.py", line 451, in handleSubmitPage
    followCompany = self.driver.find_element(By.CSS_SELECTOR, constants.followCheckboxCSS)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/twitterduck/EasyApplyJobsBot/myenv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 898, in find_element
    return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/twitterduck/EasyApplyJobsBot/myenv/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 429, in execute
    self.error_handler.check_response(response)
  File "/home/twitterduck/EasyApplyJobsBot/myenv/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 232, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"label[for='follow-company-checkbox']"}
  (Session info: chrome=131.0.6778.69); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Stacktrace:
#0 0x5e9971cde1fa <unknown>
#1 0x5e99717ee810 <unknown>
#2 0x5e997183d506 <unknown>
#3 0x5e997183d7a1 <unknown>
#4 0x5e9971882c24 <unknown>
#5 0x5e99718615ad <unknown>
#6 0x5e9971880007 <unknown>
#7 0x5e9971861323 <unknown>
#8 0x5e997182fde0 <unknown>
#9 0x5e9971830dbe <unknown>
#10 0x5e9971caa12b <unknown>
#11 0x5e9971cae0c7 <unknown>
#12 0x5e9971c976cc <unknown>
#13 0x5e9971caec47 <unknown>
#14 0x5e9971c7c67f <unknown>
#15 0x5e9971ccd288 <unknown>
#16 0x5e9971ccd450 <unknown>
#17 0x5e9971cdd076 <unknown>
#18 0x78c85f09ca94 <unknown>
#19 0x78c85f129c3c <unknown>

Metadata

Metadata

Assignees

No one assigned

    Labels

    TDDTDD (testing driven development) - add tests before developing functionalitybugSomething isn't workinghelp welcomedI'm not planning to do it soon so I leave it to others to solve

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions