前提・実現したいこと
以下のサイトを参考にして、SBI証券にログインしようとしています。
https://hato.yokohama/scraping_sbi_investment/
開発環境
Python 3.7.1
PyCharm 2018.3.2
作成したコード
import time from selenium import webdriver driver = webdriver.Chrome() # SBI証券のトップ画面を開く driver.get('https://www.sbisec.co.jp/ETGate') # ユーザーIDとパスワードをセット input_user_id = driver.find_element_by_name('user_id') input_user_id.send_keys('*******') input_user_password = driver.find_element_by_name('user_password') input_user_password.send_keys('*******') time.sleep(1) # ログインボタンをクリックしてログイン driver.find_element_by_name('ACT_login').click()
できないこと・エラーメッセージ
以下のようなエラーが出て、ログインができません。
ID/passwordは入力できますが、ログイン実行の挙動でエラーが起きています。
/Users/user/anaconda3/bin/python /Users/user/PycharmProjects/python_programming/ipo2.py Traceback (most recent call last): File "/Users/user/PycharmProjects/python_programming/ipo2.py", line 17, in <module> driver.find_element_by_name('ACT_login').click() File "/Users/user/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "/Users/user/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute return self._parent.execute(command, params) File "/Users/user/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/Users/user/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input type="image" src="https://a248.e.akamai.net/f/248/29350/7d/pict.sbisec.co.jp/sbisec/images/base02/btn-sub-login.gif" name="ACT_login" alt="ログイン" title="ログイン" class="ov" width="152" height="42" onclick="changeNWEBFLG();"> is not clickable at point (995, 555). Other element would receive the click: <div class="karte-widget__container karte-animated karte-fadeIn">...</div> (Session info: chrome=76.0.3809.100)
line 17は上記コードの末尾になります。
driver.find_element_by_name('ACT_login').click()
有識者の方々、解決方法をご教示いただけないでしょうか。
よろしくお願いいたします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/23 13:34
2019/08/23 23:49