[英]Selenium Webdriver Issue w/ Chrome in Python: Traceback Errors & Can't Determine Loading Status
試圖運行從這個 github 項目中找到的代碼
我不斷遇到以下錯誤:
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)
我使用的是 Windows 64 .. 我不確定 Selenium 是否找不到路徑或問題是什么。 目前,程序會在錯誤發生前打開 Linkedin。 我嘗試了許多不同的解決方案,包括不同版本的 chrome,以及 Selenium 和 Chrome 的不同路徑。
如果我使用 Chrome 版本 2.41(最新),我會收到此消息...
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&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)
謝謝! &如果我能幫上忙,請告訴我。
更新- 您正在嘗試單擊一個不可見的元素或由於按鈕上的覆蓋而單擊另一個跨度,鑒於此處的錯誤 -
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&upsellOrderOrigin=premium_nav_upsell_text" class="link-without-visited-state nav-item__spotlight-upsell premium-upsell-link--long ember-view">...</a>
原始答案將您的 chrome 驅動程序(當前為 2.29)從這里更新到最新版本 2.41 - https://sites.google.com/a/chromium.org/chromedriver/downloads
您當前的驅動程序不支持 Chrome 版本,即 ver 68
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.