简体   繁体   中英

Selenium Webdriver Issue w/ Chrome in Python: Traceback Errors & Can't Determine Loading Status

Attempting to run a code found from this github project

I keep running into the following errors:

DevTools listening on ws://127.0.0.1:12522/devtools/browser/17d610a1-0dc4-45da-8766-b1592dd689ab
Logging into Linkedin account ...
Traceback (most recent call last):
  File ".\LinkedinEasyApply.py", line 244, in <module>
    login(driver, username, password)
  File ".\LinkedinEasyApply.py", line 49, in login
    driver.get("https://www.linkedin.com/")
  File "C:\Users\Seane\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 332, in get
    self.execute(Command.GET, {'url': url})
  File "C:\Users\Seane\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Seane\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
  (Session info: chrome=68.0.3440.106)
  (Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 10.0.17134 x86_64)

I am using windows 64.. I'm not sure if Selenium can't find the path or what the issue is. Currently, the program opens Linkedin before the error occurs. I've tried numerous different solutions inlcuding different versions of chrome, and different paths to Selenium and Chrome.

If I use Chrome version 2.41 (the latest) I get this message...

Traceback (most recent call last):
  File ".\LinkedinEasyApply.py", line 246, in <module>
    searchJobs(driver)
  File ".\LinkedinEasyApply.py", line 92, in searchJobs
    search_button.click()
  File "C:\Users\Seane\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "C:\Users\Seane\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webelement.py", line 628, in _execute
    return self._parent.execute(command, params)
  File "C:\Users\Seane\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Seane\AppData\Local\Programs\Python\Python36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Element <button class="jobs-search-box__submit-button button-secondary-large-inverse" data-ember-action="" data-ember-action-1764="1764">...</button> is not clickable at point (971, 20). Other element would receive the click: <a id="ember1706" data-control-name="premium_nav_upsell_text_click" title="Free Upgrade to Premium" href="/premium/products/?destRedirectURL=https%3A%2F%2Fwww.linkedin.com%2Fjobs%2F%3FshowPremiumWelcomeBanner%3Dtrue&amp;upsellOrderOrigin=premium_nav_upsell_text" class="link-without-visited-state nav-item__spotlight-upsell premium-upsell-link--long ember-view">...</a>
  (Session info: chrome=68.0.3440.106)
  (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 x86_64)

Thanks! & Let me know if I can be of any help.

Update - You are trying to click an element that is not visible or clicking on another span because of an overlay over the button, given the error here -

Other element would receive the click: <a id="ember1706" data-control-name="premium_nav_upsell_text_click" title="Free Upgrade to Premium" href="/premium/products/?destRedirectURL=https%3A%2F%2Fwww.linkedin.com%2Fjobs%2F%3FshowPremiumWelcomeBanner%3Dtrue&amp;upsellOrderOrigin=premium_nav_upsell_text" class="link-without-visited-state nav-item__spotlight-upsell premium-upsell-link--long ember-view">...</a>

Original Answer Update your chrome driver (currently 2.29) from here to latest version 2.41 - https://sites.google.com/a/chromium.org/chromedriver/downloads

Your current driver doesn't supports the Chrome version ie ver 68

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM