seleniumでWordPress内の検索したいのですが、エラーでうまくいきません
※ちなみにGoogleなどは簡単に検索できました。
対象サイト(参考例:テンプレート「sango」)
https://setsuyaku-rich.com/blog/
test.py
1import time 2from selenium import webdriver 3from selenium.webdriver.common.keys import Keys 4 5driver = webdriver.Chrome("C:/chromedriver.exe") 6driver.get("https://setsuyaku-rich.com/blog/") 7#driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") 8time.sleep(2) 9 10xpath = '//*[@id="s"]' 11tmp = driver.find_elements_by_xpath(xpath)[0] 12tmp.send_keys("ポイント") 13tmp.send_keys(Keys.RETURN)
エラー内容
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
数秒待機してみたりしているのですが、
検索へクリックできてないようです。
この場合どのようにしたらseleniumで検索できますでしょうか?
回答1件
あなたの回答
tips
プレビュー