前提・実現したいこと
seleniumでgmailにlogin後、drivergetでページを遷移しようとしたところ
エラーが発生するようになってしまいました
前はならなかったのですが急に起きるようになってしまい、環境を再構築し直しましたが
できませんでした。ご教授願います
発生している問題・エラーメッセージ
Traceback
1 File "hoge.py", line 23, in <module> 2 driver.get("https://www.yahoo.co.jp/") 3 File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 324, in get 4 self.execute(Command.GET, {'url': url}) 5 File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 310, in execute 6 response = self.command_executor.execute(driver_command, params) 7 File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 466, in execute 8 return self._request(command_info[0], url, body=data) 9 File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/remote/remote_connection.py", line 490, in _request 10 resp = self._conn.getresponse() 11 File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1331, in getresponse 12 response.begin() 13 File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 297, in begin 14 version, status, reason = self._read_status() 15 File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 266, in _read_status 16 raise RemoteDisconnected("Remote end closed connection without" 17http.client.RemoteDisconnected: Remote end closed connection without response
該当のソースコード
Python3
from selenium import webdriver from selenium.webdriver.common.keys import Keys from time import sleep driver = webdriver.Chrome() #gmail login driver.get("https://accounts.google.com/signin/v2/identifier?hl=ja&passive=true&continue=https%3A%2F%2Fwww.google.co.jp%2F&flowName=GlifWebSignIn&flowEntry=ServiceLogin") sleep(2) element = driver.find_element_by_xpath("//*[@id='identifierId']") element.send_keys("gmail ID") sleep(2) element = driver.find_element_by_xpath("//*[@id='identifierNext']") element.click() sleep(2) element = driver.find_element_by_xpath("//*[@id='password']/div[1]/div/div[1]/input") element.send_keys("gmail PW") sleep(2) element = driver.find_element_by_xpath("//*[@id='passwordNext']") element.click() sleep(5) driver.get("https://www.yahoo.co.jp/")
試したこと
PCの初期化しましたダメでした

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。