何回か読み込み一度エラーなく使えると思ったのですが
chromeのバージョンを最新にして再度パソコンを再起動したり、chromeを再起動したのですが、
エラーが再度出てしまいます。
GoogleChrome バージョン: 85.0.4183.83(Official Build) (64 ビット)
jupyterlab
1from selenium import webdriver 2import time 3import pandas as pd 4import os 5import datetime 6↓ 7USER = "test_user" 8PASS = "test_pw" 9↓ 10browser = webdriver.Chrome() 11browser.implicitly_wait(3) 12↓ 13NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="swpm_user_name"]"} 14 (Session info: chrome=85.0.4183.83) 151 16
エラー内容
jupyterlab
1NoSuchElementException Traceback (most recent call last) 2<ipython-input-5-623121a9e63f> in <module> 3----> 1 elem = browser.find_element_by_id('swpm_user_name') 4 2 elem.clear() 5 3 elem.send_keys(USER) 6 4 elem = browser.find_element_by_id('swpm_pasword') 7 5 elem.clear() 8 9~/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py in find_element_by_id(self, id_) 10 358 element = driver.find_element_by_id('foo') 11 359 """ 12--> 360 return self.find_element(by=By.ID, value=id_) 13 361 14 362 def find_elements_by_id(self, id_): 15 16~/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py in find_element(self, by, value) 17 974 by = By.CSS_SELECTOR 18 975 value = '[name="%s"]' % value 19--> 976 return self.execute(Command.FIND_ELEMENT, { 20 977 'using': by, 21 978 'value': value})['value'] 22 23~/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params) 24 319 response = self.command_executor.execute(driver_command, params) 25 320 if response: 26--> 321 self.error_handler.check_response(response) 27 322 response['value'] = self._unwrap_value( 28 323 response.get('value', None)) 29 30~/.pyenv/versions/3.8.0/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 31 240 alert_text = value['alert'].get('text') 32 241 raise exception_class(message, screen, stacktrace, alert_text) 33--> 242 raise exception_class(message, screen, stacktrace) 34 243 35 244 def _value_or_default(self, obj, key, default): 36 37NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="swpm_user_name"]"} 38 (Session info: chrome=85.0.4183.83) 39
回答1件
あなたの回答
tips
プレビュー