質問編集履歴
3
さらにコードを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -134,7 +134,7 @@
|
|
134
134
|
|
135
135
|
|
136
136
|
|
137
|
-
driver = webdriver.Chrome("C:/Users/user/AppData/Local/Program/Python/Python36-32/MyScript/chromedriver_win32")
|
137
|
+
driver = webdriver.Chrome("C:/Users/user/AppData/Local/Program/Python/Python36-32/MyScript/chromedriver_win32/chromedriver.exe")
|
138
138
|
|
139
139
|
content = driver.find_element_by_name("q")
|
140
140
|
|
@@ -180,7 +180,7 @@
|
|
180
180
|
|
181
181
|
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\MyScript\SeleniumTest.py", line 6, in <module>
|
182
182
|
|
183
|
-
driver = webdriver.Chrome("C:/Users/user/AppData/Local/Program/Python/Python36-32/MyScript/chromedriver_win32")
|
183
|
+
driver = webdriver.Chrome("C:/Users/user/AppData/Local/Program/Python/Python36-32/MyScript/chromedriver_win32/chromedriver.exe")
|
184
184
|
|
185
185
|
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
|
186
186
|
|
@@ -190,7 +190,7 @@
|
|
190
190
|
|
191
191
|
os.path.basename(self.path), self.start_error_message)
|
192
192
|
|
193
|
-
selenium.common.exceptions.WebDriverException: Message: 'chromedriver
|
193
|
+
selenium.common.exceptions.WebDriverException: Message: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
|
194
194
|
|
195
195
|
|
196
196
|
|
2
回答を受けて追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -115,3 +115,83 @@
|
|
115
115
|
|
116
116
|
|
117
117
|
32bit版しかなかったので、それを使ったことが原因かなと思うのですが、64bit版はどこにあるのでしょうか?
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
#追記
|
124
|
+
|
125
|
+
```python
|
126
|
+
|
127
|
+
# -*- coding: utf-8 -*-
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
from selenium import webdriver
|
132
|
+
|
133
|
+
from selenium.webdriver.common.keys import Keys
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
driver = webdriver.Chrome("C:/Users/user/AppData/Local/Program/Python/Python36-32/MyScript/chromedriver_win32")
|
138
|
+
|
139
|
+
content = driver.find_element_by_name("q")
|
140
|
+
|
141
|
+
content.send_keys("this is test")
|
142
|
+
|
143
|
+
content.send_keys(Keys.ENTER)
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
```
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
エラーメッセージ
|
154
|
+
|
155
|
+
```ここに言語を入力
|
156
|
+
|
157
|
+
Traceback (most recent call last):
|
158
|
+
|
159
|
+
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start
|
160
|
+
|
161
|
+
stdout=self.log_file, stderr=self.log_file)
|
162
|
+
|
163
|
+
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 709, in __init__
|
164
|
+
|
165
|
+
restore_signals, start_new_session)
|
166
|
+
|
167
|
+
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 997, in _execute_child
|
168
|
+
|
169
|
+
startupinfo)
|
170
|
+
|
171
|
+
FileNotFoundError: [WinError 2] 指定されたファイルが見つかりません。
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
During handling of the above exception, another exception occurred:
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
Traceback (most recent call last):
|
180
|
+
|
181
|
+
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\MyScript\SeleniumTest.py", line 6, in <module>
|
182
|
+
|
183
|
+
driver = webdriver.Chrome("C:/Users/user/AppData/Local/Program/Python/Python36-32/MyScript/chromedriver_win32")
|
184
|
+
|
185
|
+
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 62, in __init__
|
186
|
+
|
187
|
+
self.service.start()
|
188
|
+
|
189
|
+
File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
|
190
|
+
|
191
|
+
os.path.basename(self.path), self.start_error_message)
|
192
|
+
|
193
|
+
selenium.common.exceptions.WebDriverException: Message: 'chromedriver_win32' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
```
|
1
表現の訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
#問題
|
2
2
|
|
3
|
-
http://chromedriver.storage.googleapis.com/index.html?path=2.9/より、ドライバーをインストールして実行したのですが、
|
3
|
+
http://chromedriver.storage.googleapis.com/index.html?path=2.9/より、ドライバーをインストールして実行したのですが、実行すると途中で強制停止します。
|
4
|
-
|
5
|
-
#実行環境
|
6
4
|
|
7
5
|
Windows10 64bit
|
8
6
|
|